Router Cache
The fourth Next.js caching tier: the browser keeps RSC payloads of visited and prefetched route segments in memory for instant navigation.
In more detail
Back and forward navigation and shared layouts reuse it. In Next.js 15 page segments are not reused for dynamic routes by default (stale time 0), while static prefetched routes stay for five minutes. It is cleared by a full reload, router.refresh() or revalidation in a Server Action.
Related terms
- prefetching — Loading a route's data in the background before the user clicks, so navigation feels instant.
- staleTimes — An experimental next.config option that sets how long the Router Cache may reuse dynamic and static page segments.
- router.refresh() — A method that clears the Router Cache for the current route and asks the server for a fresh render, keeping client state.
- RSC payload — The compact data stream React produces from Server Components, describing the rendered tree, props for Client Components and placeholders.
Taught in
- Full Route Cache: Static Rendering & Segment Config — Next.js 15 & Modern App Router Architecture
- Router Cache: In-Memory Client Prefetch Semantics — Next.js 15 & Modern App Router Architecture