Skip to content

Commit 9fb1fe7

Browse files
lilnasydreyfus92
andcommitted
Update src/content/docs/en/guides/incremental-static-regeneration.mdx
Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
1 parent 93ac1c3 commit 9fb1fe7

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/content/docs/en/guides/incremental-static-regeneration.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,10 @@ export const onRequest = async ({ request }, next) => {
150150
const cachedResponse = await cache.match(request)
151151

152152
if (cachedResponse) {
153-
154153
const expires = Number(cachedResponse.headers.get('X-Expires'))
155-
156154
if (expires > Date.now()) {
157155
return cachedResponse
158-
}
159-
160-
else {
156+
} else {
161157
await cache.delete(request)
162158
}
163159
}

0 commit comments

Comments
 (0)