cloudflare/vinext

Resume Data Cache (RDC) not consistent between static and dynamic renders

開放

#1,488 建立於 2026年5月22日

 (0 則留言) (0 個反應) (0 位負責人)TypeScript (386 個分叉)github user discovery
adapter-api-e2ehelp wanted

倉庫指標

星標
 (8,635 顆星)
PR 合併指標
 (平均合併 1天 1小時) (30 天內合併 462 個 PR)

描述

This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext main vs Next.js v16.2.6, 2026-05-22).

Problem

Pages rendered with "use cache" and fetch cache do not produce the same data on dynamic render that they produced during prerender — the Resume Data Cache is not being primed from the prerender or is not being consulted during dynamic render. updateTag from server actions also does not bust the RDC entry, so the same stale value persists when it should refresh.

Expected substring: "0.5672323145592139"
Received: ...<p id="random-number">0.9168380475126083</p>

Estimated Impact

~4 test failures across the deploy suite.

Affected Test Suites

  • test/e2e/app-dir/resume-data-cache/resume-data-cache.test.ts (4 failures)

Recommendation

  1. Reproduce first in vinext's own test suite. Add a page with "use cache" that returns a random number, prerender, then hit the page dynamically. Assert the same random number is returned.

  2. Persist prerender cache state into the RDC. Serialise cache outputs during prerender and expose them to the runtime so dynamic renders read the prerendered values.

  3. Bust the RDC on updateTag. Tag invalidations should clear matching RDC entries.

貢獻者指南