Skip to content

Commit

Permalink
Revert "Set default stale-while-revalidate header value to 1 year" (#…
Browse files Browse the repository at this point in the history
…65887)

This PR was run without CI. Reverting so we can reland after it passes
CI.

Reverts #65867
  • Loading branch information
ztanner committed May 17, 2024
1 parent 046acd5 commit 168d125
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/next/src/server/lib/revalidate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ export function formatRevalidate({
revalidate: Revalidate
swrDelta?: SwrDelta
}): string {
const swrHeader =
swrDelta === undefined
? `stale-while-revalidate=${CACHE_ONE_YEAR}`
: `stale-while-revalidate=${swrDelta}`
const swrHeader = swrDelta
? `stale-while-revalidate=${swrDelta}`
: 'stale-while-revalidate'

if (revalidate === 0) {
return 'private, no-cache, no-store, max-age=0, must-revalidate'
Expand Down

0 comments on commit 168d125

Please sign in to comment.