next.js
ab4b1918 - docs(cache-components): clarify allow-runtime, sync-IO and instant=false, CLS fallback (#94997)

Commit
23 days ago
docs(cache-components): clarify allow-runtime, sync-IO and instant=false, CLS fallback (#94997) ### What? Docs-only follow-ups for Cache Components and Partial Prefetching, from agent migration friction logs and Joseph's review of [#95082](https://github.com/vercel/next.js/pull/95082). - **`adopting-partial-prefetching.mdx`** — reframe the `allow-runtime` row in the audit table (it's an enhancement, not the `<Link prefetch={true}>` warning fix; the per-route opt-in is `prefetch = 'partial'`). - **`migrating-to-cache-components.mdx`** — split the `## Enable Cache Components` section into before-flag (remove `dynamic` / `revalidate` / `fetchCache`) and after-flag (translate `revalidate`, `fetchCache`, `unstable_cache`, `fetch` cache options) steps. Flag the `revalidateTag` second-argument requirement, with a Before / After example. Add two Good-to-know callouts: off-grid `revalidate` values map to the closest `cacheLife` profile; `instant = false` is allowed-to-block, not forced-dynamic. - **`blocking-prerender-current-time` / `-random` / `-crypto`** (and their `-client` siblings) — drop the misleading "Don't want this validation?" opt-out section. `instant = false` is an instant-navigation knob and doesn't suppress sync-IO prerender errors. - **Remaining `blocking-prerender-*` pages** — standardize the CLS fallback callout so they all link the canonical section. ### Why? Friction logs surfaced four recurring misreads: 1. Devs expected `prefetch = 'allow-runtime'` to silence the `<Link prefetch={true}>` warning. The docs implied it would. 2. The migration guide mixed `dynamic` removal with `unstable_cache` translation, so it wasn't clear which had to happen before the flag and which after. 3. `revalidateTag` now requires a cache profile, but the on-demand revalidation section didn't say so. 4. Sync-IO error pages still carried a "Don't want this validation?" opt-out that doesn't actually work for those errors.
Author
Parents
Loading