Open
Conversation
🦋 Changeset detectedLatest commit: 85b01f8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
Contributor
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
khuezy
reviewed
Apr 11, 2026
| if (finalRevalidate !== CACHE_ONE_YEAR || isStaleFromTagCache) { | ||
| const sMaxAge = isStaleFromTagCache | ||
| ? 1 | ||
| : Math.max(finalRevalidate - age, 1); |
Contributor
There was a problem hiding this comment.
Nit: redundant Math.max(finalRevalidate - age, 1)
vicb
approved these changes
Apr 11, 2026
| "@opennextjs/aws": patch | ||
| --- | ||
|
|
||
| Fix cache interceptor isStale handling for Next 16+ |
Contributor
There was a problem hiding this comment.
The PR description lists 2 fixes.
They should probably both be listed here.
| } | ||
| if (finalRevalidate !== CACHE_ONE_YEAR) { | ||
| const sMaxAge = Math.max(finalRevalidate - age, 1); | ||
| const isTimeStale = |
Contributor
There was a problem hiding this comment.
nits:
- should the name be
isStaleFromTimefor consistency ? - add a comment why
CACHE_ONE_YEARis special cased
| Math.max(finalRevalidate - age, 1) === 1; | ||
| const isStale = isTimeStale || isStaleFromTagCache; | ||
|
|
||
| if (finalRevalidate !== CACHE_ONE_YEAR || isStaleFromTagCache) { |
Contributor
There was a problem hiding this comment.
nit
finalRevalidate !== CACHE_ONE_YEAR is computed twice too.
Extract to a const with a comment?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix cache interceptor not using swr stale logic.
Fix next mode not using stale properly
Update e2e test to reflect that