Caching in Next.js 16 · senior
Is this fetch cached? Next.js 14 vs 15 vs 16
Next.js caching changed twice: 14 cached fetch, GET handlers and routes implicitly; 15 made them uncached by default; 16 introduced Cache Components where everything is dynamic unless you opt in with "use cache", which became the default for new apps in 16.4 and will be the default for all apps in 17.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Next 14:
fetchin Server Components was cached by default (Data Cache), GET Route Handlers were cached, and the client Router Cache kept pages: confusing, implicit caching. - Next 15 (Oct 2024):
fetchnot cached by default, GET handlers not cached, client router cache usesstaleTime: 0for page segments. Opt in withcache: "force-cache",next: { revalidate },unstable_cache, or segment config (dynamic,revalidate,fetchCache). - Previous model's four layers: Request Memoization (dedupe
fetchin one render), Data Cache (fetch results across requests), Full Route Cache (prerendered HTML/RSC), Router Cache (client). - Next 16 (Oct 2025):
cacheComponents: true(renamed fromexperimental.dynamicIO;experimental.pprremoved). All dynamic code runs at request time by default; you opt in with"use cache"+cacheLife+cacheTag. Uncached or request-time data must be inside Suspense. - Next 16.4 (Oct 2026): new
create-next-appprojects enablecacheComponentsandpartialPrefetching; Vercel recommends it for every app; it becomes the default in Next 17. - How to check: build output (static vs dynamic routes), the dev overlay insights,
NEXT_PRIVATE_DEBUG_CACHE=1, and response headers (dynamic pages sendCache-Control: private, no-cache, no-store). React.cacheonly dedupes within one render; it is not the Data Cache.- Always answer version-aware: "Which Next version and is Cache Components on?"
The red pen
Common traps: mistake → fix
Mistake: "fetch is cached by default"
Fix: true only in Next 14 and earlier.
Mistake: "
React.cacheand the Data Cache are the same"Fix: per-render dedupe vs cross-request cache.
Mistake: "Cache Components is experimental"
Fix: stable since 16.0; default for new apps since 16.4.
Easy to hard
Questions interviewers ask, easy to hard
- Your team argues in code review whether this
fetchis cached. How do you settle it? - How did the answer change across Next 14, 15 and 16?
- Name the caches in the previous model.
- What does
cacheComponents: truechange? - How do you check what is cached at runtime?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.