next.js
0dd0a5f6 - docs: clarify tag invalidation client effects (#101504)

Commit
22 days ago
docs: clarify tag invalidation client effects (#101504) ## Summary Document the client effects of immediate tag invalidation in `updateTag`'s **Client cache behavior** section: current-route re-rendering, broad route-data invalidation, automatic re-prefetching of eligible visible links, Activity state preservation, and the distinction from `revalidateTag(tag, 'max')`. Related references, guides, migration advice, and editor hints use short summaries and links to that explanation. Updated surfaces: - `docs/01-app/03-api-reference/04-functions/updateTag.mdx`: current-route refresh, invalidation scope, and Activity state. - `docs/01-app/03-api-reference/04-functions/revalidateTag.mdx`: a short comparison by resolved `expire`, linked to the full explanation. - `docs/01-app/01-getting-started/09-revalidating.mdx`: brief notes linking client effects and invalidation scope to the references. - `docs/01-app/02-guides/server-actions.mdx`: include the immediate-expiry variant in response re-render guidance. - `docs/01-app/02-guides/prefetching.mdx`: qualify which Server Action calls invalidate prefetches. - `docs/01-app/02-guides/upgrading/version-16.mdx` and `errors/revalidate-tag-single-arg.mdx`: explain the client effects changed by migrating to `'max'` versus `updateTag`. - `packages/next/src/server/web/spec-extension/revalidate.ts`: align both tag API editor hints. - `packages/next/src/server/app-render/action-handler.ts`: correct the comment about immediate-expiry profiles. The existing `refresh` and `cacheLife` corrections from #101160 remain unchanged. #100894 covers that same `cacheLife` text, rather than these API and migration gaps. Finding: https://next-maintainer-agent.vercel.tools/agent-feedback/7032 ## Verification - Traced immediate-expiry signaling, action-response rendering, prefetch/back-forward invalidation, and Activity preservation in canary source at `4d51724b7c1`. - Reviewed the recorded production reproduction on Next.js 16.4.2 and 16.5.0-canary.46; did not rerun it or test another published version. - Focused ESLint and Prettier checks passed for all changed files. - Both changed TypeScript files emit identical JavaScript with comments removed. - Full `pnpm lint` failed on existing unused Rust turbo-tasks items. `pnpm build-all` stopped because the temporary worktree lacks `microbundle`. <!-- NEXT_JS_LLM -->
Author
Parents
Loading