-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only cache successful fetches (#48033)
### What? Change the caching logic for fetch-cache to only cache successful responses. ### Why? Currently fetch-cache will cache any response, without checking the http status code. But situations like 500 and 304 and others should not be cached, because we want to re-fetch from the origin. ### How? Add an extra check before deciding to call `incrementalCache.set()` --------- Co-authored-by: JJ Kasper <jj@jjsweb.site>
- Loading branch information
Showing
4 changed files
with
9 additions
and
16 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
2 changes: 2 additions & 0 deletions
2
test/e2e/app-dir/app-static/app/variable-revalidate/status-code/page.js
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