Cache-disabled production fixture
What you need to know
A cache experiment needs a known starting state, a separate origin counter and production-mode requests. This lesson’s existing slug says cache-disabled: here that means Cache Components is disabled, not that every cache in Next.js is disabled.
By the end, you can: specify cold and warm requests; measure origin calls.
Select the explicit cache lane
// next.config.tsimport type { NextConfig } from 'next';const config: NextConfig = { cacheComponents: false };export default config;Expected behavior (not framework-tested): Route segment cache exports are taught in this lane, not mixed with use cache directives.
How it works
The staged V6 fixture uses an independent loopback origin with a revision and per-path counters. The application reads /catalog using force-cache, /availability using no-store, and /isr using time-based revalidation. Build-time reads count too. Use a disposable project, a fresh build directory and origin process; record the counter immediately after build, then after each direct production request. Do not reset counters between related observations. The counter endpoint is lab-only, never an externally exposed admin interface.
Compare direct requests with client navigation separately. In development, Hot Module Replacement can preserve results even when a fetch says no-store, and dev mode does not model production prerendering reliably. A hard refresh, link prefetch and router refresh have different effects. router.refresh() asks for a new server payload but does not by itself invalidate persistent server data. Also record response body revision, request timestamps, selected cache configuration, server process count and whether a shared cache exists. An observed single-instance result cannot prove multi-instance invalidation consistency.
Record a production observation
# In a reviewed disposable app; origin already running.# Build using the pinned local framework, then start separately.npm run build# terminal 2: npm run start -- --hostname 127.0.0.1 --port 4318curl -fsS http://127.0.0.1:4317/statscurl -fsS http://127.0.0.1:4318/livecurl -fsS http://127.0.0.1:4318/livecurl -fsS http://127.0.0.1:4317/statsExpected behavior (not framework-tested): Two distinct request-time live reads should increase the availability counter in the isolated lab; confirm rather than invent a measured count.
Common mistake
A fast response does not prove a cache hit, and an unchanged revision does not prove the origin was skipped. Use counters plus revision values and test only one changed condition at a time. Never delete an unrelated build directory or reset a shared production cache to run this experiment.
Practice and verification
Create a table with one row per request: route, timestamp, revision, counter before/after, expected cache layer and observed result. Mark build, direct warm request, expired request and navigation separately. If the framework cannot run, leave observations blank rather than filling them with predictions.
Scope: App Router, proposed Next.js 16.x, Cache Components disabled for these labs. Snippets assume a reviewed TypeScript app and are static examples; framework behavior has not been executed. Exact supported patch and dependency set must be verified before running.
Further reading: Isr · Fetch · Router · Cache Model