Skip to content

Commit

Permalink
Update src/content/docs/en/guides/incremental-static-regeneration.mdx
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
  • Loading branch information
lilnasy and dreyfus92 authored Aug 30, 2023
1 parent c544cfa commit 8296b36
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,10 @@ export const onRequest = async ({ request }, next) => {
const cachedResponse = await cache.match(request)

if (cachedResponse) {

const expires = Number(cachedResponse.headers.get('X-Expires'))

if (expires > Date.now()) {
return cachedResponse
}

else {
} else {
await cache.delete(request)
}
}
Expand Down

0 comments on commit 8296b36

Please sign in to comment.