Next.js Developer interview question · Most asked
How did caching defaults change in Next.js 15?
Summary
Next.js 15 made caching opt-in: fetch requests are no longer cached by default, GET Route Handlers are not cached by default, and the client Router Cache no longer reuses page segments (stale time 0) on navigation.
Longer Answer
In Next.js 14, fetch defaulted to force-cache, which surprised many developers with stale data. In 15 you explicitly opt in with cache: 'force-cache', next: { revalidate }, or segment config like export const dynamic = 'force-static'. Pages without dynamic APIs can still be statically pre-rendered at build time. Next.js 15 also made request APIs (cookies(), headers(), params, searchParams) asynchronous.
Key Points
fetchuncached by default in 15- GET Route Handlers uncached by default
- Router Cache staleTime 0 for pages
- Async
cookies(),headers(),params
Explanation
What interviewers look for
Awareness that behavior differs by version, and how to opt in explicitly.
Common mistakes
- Assuming Next 14 caching behavior in a Next 15+ app (or vice versa)
More most-asked Next.js Developer questions
- How does data fetching work in the App Router?
- Explain SSR, SSG, ISR and CSR in Next.js.
- What happens, step by step, when a request reaches a Next.js App Router application?
- What is Next.js and what problems does it solve on top of React?
- What are the differences between the App Router and the Pages Router?
- What is the difference between Server Components and Client Components?
- Explain the App Router file conventions: page, layout, loading, error, not-found, template and route.
- What are Server Actions and how do you use them for mutations?