Enable Cache Components
What you need to know
Cache Components is an opt-in App Router configuration that lets you combine prerendered content, explicitly reusable results and request-time regions in one route. Enable it in a separate application before changing an existing caching design.
By the end, you can: identify configuration lane; distinguish incompatible route options.
Enable the feature in next.config.ts
import type { NextConfig } from 'next';const config: NextConfig = { cacheComponents: true };export default config;Expected behavior: The proposed Next.js 16.x app opts into Cache Components; restart or rebuild after editing config.
How it works
Start with a route containing a public bookstore heading, a catalog and a personalized reading list. The heading can be included in the shell without accessing data. The catalog can be explicitly cached if it is identical for the same public inputs. The reading list must wait for a request and check the visitor's identity. These are three decisions, not three different kinds of URL. With the feature enabled, unhandled asynchronous or request-dependent work outside a suitable Suspense or cache boundary can trigger a prerendering error. The configuration is application-wide; do not simply add it to the earlier V8 fixture, which deliberately uses a different caching lane. The documented migration removes old route-segment cache controls such as dynamic, revalidate and fetchCache rather than combining them with the new model. Use the supported Node server lane; do not plan static export for this app. A successful build alone cannot establish that request-sensitive output is isolated.
Classify a bookstore page before implementing it
Heading: public, no data dependency -> shellCatalog: public, reusable by category -> explicit cacheReading list: identity-dependent -> request-time, authorized, uncachedExpected behavior: Only public information belongs in the shared shell/cache. The private region must not be copied from another request.
Common mistake
Enabling the flag does not cache every component. Do not retain old segment options and assume they override the new model. Migrate one route in an isolated branch and verify the actual build diagnostics.
Practice and verification
Inspect the two configuration lanes in the package. Mark each component as shell, explicitly cached or runtime. Plan a production build followed by two requests with different synthetic preferences; no framework run has been performed here.
Scope: App Router, proposed Next.js 16.x and React 19, Cache Components enabled in a separate fixture. Framework snippets are staged and not executed; local pure models are not framework evidence. Exact patched dependencies and platform contracts are pending.