diff --git a/src/entry.server.tsx b/src/entry.server.tsx index e9da416c..3ab4c3f3 100644 --- a/src/entry.server.tsx +++ b/src/entry.server.tsx @@ -26,14 +26,14 @@ export default function handleRequest( // if we have a cached response, check if it's less than 5 seconds old const now = new Date(); const diff = now.getTime() - cachedResponse.date.getTime(); - // if (diff < 5000) { - // // if it's less than 5 seconds old, return the cached response - // responseHeaders.set('Content-Type', 'text/html'); - // return new Response(cachedResponse.html, { - // headers: responseHeaders, - // status: responseStatusCode, - // }); - // } + if (true || diff < 5000) { + // if it's less than 5 seconds old, return the cached response + responseHeaders.set('Content-Type', 'text/html'); + return new Response(cachedResponse.html, { + headers: responseHeaders, + status: responseStatusCode, + }); + } }