-
SummaryWill a fetch with the GET method be cached or memoized even when it results in errors? Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Answered by
icyJoseph
May 14, 2025
Replies: 1 comment 1 reply
-
If I remember correctly, it is only GET / 200 in 1443ms
│ GET https://pokeapi.co/api/v2/pokemon/foooooo 404 in 1379ms (cache skip)
│ │ Cache skipped reason: (cache-control: no-cache (hard refresh))
GET / 200 in 463ms
│ GET https://pokeapi.co/api/v2/pokemon/foooooo 404 in 439ms (cache skip)
│ │ Cache skipped reason: (cache-control: no-cache (hard refresh))
GET / 200 in 125ms vs GET / 200 in 144ms
│ GET https://pokeapi.co/api/v2/pokemon/ditto 200 in 81ms (cache skip)
│ │ Cache skipped reason: (cache-control: no-cache (hard refresh))
GET / 200 in 29ms
│ GET https://pokeapi.co/api/v2/pokemon/ditto 200 in 1ms (cache hit)
GET / 200 in 29ms
│ GET https://pokeapi.co/api/v2/pokemon/ditto 200 in 1ms (cache hit) I might do some more testing, but I think we are on right track with 200's.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Nader-CS
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I remember correctly, it is only
200
status requests that get cached by the patchedfetch
, source:next.js/packages/next/src/server/lib/patch-fetch.ts
Line 625 in 0dcee14
vs