staleTimes
An experimental next.config option that sets how long the Router Cache may reuse dynamic and static page segments.
In more detail
Next.js 15 defaults to 0 seconds for dynamic and 300 seconds for static. Raising dynamic makes back-and-forth navigation faster but can show older data.
Example
experimental: { staleTimes: { dynamic: 30, static: 180 } }Related terms
- Router Cache — The fourth Next.js caching tier: the browser keeps RSC payloads of visited and prefetched route segments in memory for instant navigation.
- next.config.js — The configuration file at the project root that sets Next.js options such as output, images and experimental features.
Taught in
- Router Cache: In-Memory Client Prefetch Semantics — Next.js 15 & Modern App Router Architecture