Skip to content

docs: add migration note for experimental cache flags to cacheComponents#92318

Merged
aurorascharff merged 18 commits into
canaryfrom
docs/cache-components-migration-note
Apr 14, 2026
Merged

docs: add migration note for experimental cache flags to cacheComponents#92318
aurorascharff merged 18 commits into
canaryfrom
docs/cache-components-migration-note

Conversation

@aurorascharff

@aurorascharff aurorascharff commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

What?

Add a "Migrating from experimental flags" section to the cacheComponents config reference page, documenting that experimental.useCache and experimental.cacheComponents are deprecated in favor of top-level cacheComponents: true.

Why?

Three config paths exist with overlapping semantics (experimental.useCache, experimental.cacheComponents, cacheComponents), but no documentation explains their relationship or how to migrate. The build output shows different labels for each ("Experiments: ✓ useCache" vs "Cache Components enabled"), making them look like different features. Both human developers and AI agents encounter this ambiguity and may use the wrong flag.

How?

Added a before/after code example to docs/01-app/03-api-reference/05-config/01-next-config-js/cacheComponents.mdx showing the migration from either experimental flag to the top-level config, with a note that both experimental flags are deprecated.

@nextjs-bot nextjs-bot added created-by: Next.js DevEx team PRs by the DX team. Documentation Related to Next.js' official documentation. labels Apr 3, 2026
@aurorascharff aurorascharff marked this pull request as ready for review April 3, 2026 21:39
Copilot AI review requested due to automatic review settings April 3, 2026 21:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds migration guidance to the cacheComponents config reference to reduce confusion between legacy experimental flags and the current top-level cacheComponents option.

Changes:

  • Adds a “Migrating from experimental flags” section explaining how to switch from experimental.useCache / experimental.cacheComponents to cacheComponents: true.
  • Provides a before/after config example and a deprecation note for the experimental flags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/01-app/03-api-reference/05-config/01-next-config-js/cacheComponents.mdx Outdated
Comment thread docs/01-app/03-api-reference/05-config/01-next-config-js/cacheComponents.mdx Outdated
Comment thread docs/01-app/03-api-reference/05-config/01-next-config-js/cacheComponents.mdx Outdated
- Document deprecated experimental.useCache / experimental.cacheComponents
- Use full next.config.ts before/after examples with optional experimental.cacheComponents

Made-with: Cursor
Comment thread docs/01-app/03-api-reference/05-config/01-next-config-js/cacheComponents.mdx Outdated
Comment thread docs/01-app/03-api-reference/05-config/01-next-config-js/cacheComponents.mdx Outdated
- Rewrite intro to reflect current Cache Components education angle
- Update migration section: mention useCache + dynamicIO, drop
  experimental.cacheComponents, soften deprecation language
- Add experimental.useCache to v16 upgrade guide alongside dynamicIO

Made-with: Cursor
Comment thread docs/01-app/03-api-reference/05-config/01-next-config-js/cacheComponents.mdx Outdated
@aurorascharff aurorascharff marked this pull request as draft April 10, 2026 11:28
aurorascharff and others added 2 commits April 11, 2026 15:45
…Components.mdx

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
@aurorascharff aurorascharff marked this pull request as ready for review April 11, 2026 13:52
Comment thread docs/01-app/03-api-reference/05-config/01-next-config-js/cacheComponents.mdx Outdated
@aurorascharff aurorascharff merged commit 901cb55 into canary Apr 14, 2026
76 checks passed
@aurorascharff aurorascharff deleted the docs/cache-components-migration-note branch April 14, 2026 14:05
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

created-by: Next.js DevEx team PRs by the DX team. Documentation Related to Next.js' official documentation. locked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants