Question presented to candidate: "You are upgrading an app from Next.js 14. Which caching defaults changed in 15, what will you notice, and how do you opt back in where you need to?"
What a strong answer should cover:
fetchrequests are no longer cached by default: the default moved from force-cache to not cached.- GET Route Handlers are no longer cached by default; opt in with
export const dynamic = 'force-static'. - The client Router Cache no longer reuses pages of dynamic routes on navigation:
staleTimes.dynamicwent from 30 s to 0 s. - Static pages, layouts, loading states and back/forward navigation are still reused.
- Next.js 16 keeps these defaults and adds Cache Components, where data is uncached unless marked with 'use cache'; since 16.4,
create-next-appenables it for new App Router apps.
Clarifying questions expected:
- "Which pages relied on implicit caching?" β they may get slower or hit the API more after the upgrade.
- "Are you planning to adopt Cache Components?" β then opt back in with 'use cache' rather than fetch options.
Code / implementation expected: Yes β the three opt-backs.