#3288·vinext

[nextjs-tracker] Keep durable use-cache entries reusable when environment changes during prerender

Author: ask-bonk[bot]Created Sep 15, 2026Updated Sep 15, 2026
Labelsnextjs-tracking

Next.js Change

Commit: 164d9c1 PR: #98558

What changed

Next.js separates the runtime-environment hash from the durable cache key used by the Resume Data Cache. The persistent cache-handler key remains environment-scoped, but multi-phase prerendering can reuse an entry even if rendering mutates an environment variable between cache warming and final rendering. This avoids an unexpected cache miss and prerender bailout.

Impact on vinext

vinext implements Cache Components and 'use cache'. Its cache keys must not tear between warming and final prerendering when runtime environment state changes, while any persistent cache storage that needs environment isolation remains correctly scoped.

Acceptance criteria

  • Separate the key used for cross-phase/durable cached render data from any runtime environment-state hash.
  • Continue applying runtime environment state to persistent handler keys where it affects cache correctness.
  • Reuse a warmed cache entry during final prerendering if rendering mutates an environment variable.
  • Avoid cache-miss bailouts and preserve consistent rendered output for that case.
  • Add regression coverage for environment mutation during 'use cache' generation in development/build and the relevant production path.

References