Build1 publisher2 min readPublished
Next.js keeps a navigated static route in the browser for five minutes
A dev.to walkthrough pins most Next.js stale-data and performance trouble on four caching layers being read as one switch, with lifetimes as short as a single render pass and as long as five minutes of client navigation history.
The Engineer · Build desk

What happened
- A dev.to walkthrough attributes most Next.js caching problems to four distinct mechanisms being treated as a single black box, and calls the resulting bugs predictable.
- The four layers it separates are render-scoped request memoization, a server-persistent data cache, a full route cache of build-time HTML, and a client-side router cache.
- The router cache holds navigated route payloads in the client for 30 seconds on dynamic routes and 5 minutes on static ones, to speed back and forward navigation.
- The data cache holds fetch responses across requests on the server until revalidatePath, revalidateTag, or a time-based revalidation window clears them.
- The described failure pattern is teams seeing unexpected stale data, applying cache: 'no-store' everywhere, and watching performance collapse.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- cost The no-store reflex moves the bill to the origin API and the rendering servers, because every render reissues requests that memoization and the data cache would have absorbed.
- constraint Changing one component's fetch options changes request volume for every other component that fetches the same URL in the same render.
- decision Stale output after a back-button press and stale output on a fresh server render need different fixes, so triage has to name the layer before anyone edits a fetch call.
- exposure These durations come from an AI-assisted secondary account under human review, so a runbook that copies them inherits whatever that review missed.
Request memoization matches only when the fetch URL and the options object are identical, according to the dev.to walkthrough [5]. That rule is what makes the no-store reflex cost more than one thing. Put `{ cache: 'no-store' }` on the layout's fetch and leave the page's untouched, and the two call sites stop sharing a key, so the second one goes to the network as well [16].
The worked example in the piece is a layout and a page fetching the same user endpoint, where one request fires during server rendering; without memoization, a layout plus three children calling `/api/user` would fire four [10]. Three calls avoided out of four is a 75 percent reduction inside that render [15].
A fetch checks the memoization cache, then the data cache, then the network, and populates both on the way back [6]. Memoization resets once the server has sent its HTML response [4].
Two of the four layers do not answer to server code at all. The full route cache holds HTML prerendered at build time and skips server rendering entirely [8]. The router cache lives on the client [3], and its static window is ten times its dynamic one [14]. A revalidate call runs on the server [7], while the copy in the browser expires on its own 30-second or 5-minute timer [17].
The performance story stays an assertion in this article. It says the reflex collapses performance [2], and that teams both over-invalidate, wasting CPU, and under-invalidate, serving stale data [11]. The piece discloses that it "was written with the assistance of AI, under human supervision and review" [12]. The published text also breaks off mid-sentence at "The data cache is opt-in by default for GET req" [13].
In my view the descriptions of how each layer works earn more trust than the causal claim, because each one can be checked against a running app: render a layout and a page that fetch the same URL, watch the origin's access log, then change one options object and watch it again.
For any of this to transfer to your app, the data loading has to go through fetch. Both server-side layers are described as keyed on a URL and an options object [5][7], so an ORM call or a direct database driver gives neither layer anything to key on [18].
What to watch
- Whether anyone publishes origin request counts and server CPU before and after the no-store reflex on a real route.
- Whether other write-ups reproduce the 30-second and 5-minute router cache windows or report different values.
- Whether the data cache default for GET requests is stated in full in a revised version of the article.