nextjs - 💡(How to fix) Fix updateTag does not invalidate prefetched RSC payloads with Cache Components

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

When using Next.js 16.2.6 with Cache Components enabled, calling updateTag('items') after a Server Action does not invalidate already-prefetched RSC payloads, so navigating back via prefetched links can render stale list data until a manual refresh.

Progress Checklist

✅ = Completed · ☐ = Pending

  1. ✅ Create minimal reproduction app
    • Two parallel flows share one data store: default prefetch and prefetch=false.
  2. ✅ Verify production-only reproduction behavior
    • Built with npm run build and tested via npm run start.
  3. ✅ Confirm cache invalidation mismatch
    • updateTag('items') is called, but prefetched navigation can still serve stale payloads.
  4. ☐ Next.js team triage
    • Determine whether this is a regression or expected behavior.
  5. ☐ Upstream fix or docs clarification
    • Ensure prefetched payload behavior matches docs or document limitation clearly.

Reproduction

Repository: https://github.com/spatulatom/prefetch-revalidation

Environment:

  • Next.js: 16.2.6
  • React: 19
  • Node.js: 18+
  • cacheComponents: true

Steps:

  1. npm install
  2. npm run build
  3. npm run start
  4. Open http://localhost:3000
  5. Run "WITH Prefetch" flow: create item -> open item -> add comment -> go back home
  6. Observe stale UI until manual refresh in prefetched case
  7. Run "WITHOUT Prefetch" flow with prefetch=false and observe immediate fresh data

Expected:

  • updateTag('items') should invalidate associated prefetched payloads, and back navigation should show fresh data immediately.

Actual:

  • Back navigation can use stale prefetched payloads even after updateTag('items'); fresh data appears only after manual refresh.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING