App Router ISR: `revalidate` / `fetchCache` / `force-static` / `unstable_cache` do not produce stable values
#1 487 ouverte le 22 mai 2026
Métriques du dépôt
- Stars
- (8 120 stars)
- Métriques de merge PR
- (Merge moyen 1j 1h) (462 PRs mergées en 30 j)
Description
This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext
mainvs Next.jsv16.2.6, 2026-05-22).
Problem
Many app-static and prerender tests show that vinext renders fresh values on every request rather than serving and revalidating cached values. unstable_cache, fetchCache, force-static, force-no-store, cache: "force-cache", cache: no-store, POST cache, and on-demand revalidate (via res.revalidate / updateTag) all fail to produce the expected caching semantics. ~18 failures concentrated in app-static.test.ts plus one prerender failure.
Expected: not "revalidate 10: 0.642956684821526" // identical value should be cached but was not
Error: TIMED OUT: success (on-demand revalidate)
Estimated Impact
~18 test failures across the deploy suite.
Affected Test Suites
test/e2e/app-dir/app-static/app-static.test.ts(17 failures)test/e2e/prerender.test.ts
Recommendation
-
Reproduce first in vinext's own test suite. Cover the main directives independently: route-level
revalidate,force-static,force-no-store,unstable_cache, fetchcache: 'force-cache'/'no-store'. For each, verify the second request sees the cached/fresh value as expected. -
Implement the ISR cache. Wire a deploy-mode cache store (probably backed by Cloudflare KV/cache API) so that ISR-style values are persisted across requests.
-
Respect every fetch directive. Make sure
cache,next.revalidate,next.tagsonfetch()calls all affect cache reads. -
Hook into the revalidate primitives.
revalidatePath/revalidateTag/updateTagshould evict matching entries from this store.