-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add delta time to stale-while-revalidate header
As per specification (RFC 5861), the cache control parameter stale-while-revalidate accepts a duration in seconds on how long serving stale (but unvalidated) requests is considered to be acceptable. As far as I can tell omitting this duration is not allowed by RFC 5861 at all. At least some cloud providers refuse to accept this header when it omits a duration, while they accept it when containing a duration. As far as I can tell the next.js interpretation of leaving out a value was that it means "infinite". This commit approximates an infinite duration with 1 year, which is consistent with the maxage parameter sent for requests without revalidation.
- Loading branch information
1 parent
eb3d748
commit b7c7af8
Showing
6 changed files
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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