Open
Description
When cachePolicy
is set to cache-first
, non-2xx
responses are cached. I want to be able to avoid caching non-2xx
response.
The codesandbox uses a 404
response as that is what was easiest for me to use there. However, the actual issue I ran into was with a 503
response. Caching 5xx
responses is a bad idea.
** Codesandbox **
https://codesandbox.io/s/kind-christian-x2he1?file=/src/App.js
To Reproduce
Steps to reproduce the behavior:
- Go to https://codesandbox.io/s/kind-christian-x2he1?file=/src/App.js
- Look in the console
- See that the
404
response was cached.
Expected behavior
Either non-2xx
responses do not get cached; or there should be an option so that only 2xx
responses are cached.
Metadata
Metadata
Assignees
Labels
No labels