"use cache": serve stale entries while revalidating in background (Next.js #74882 / #92636)
Next.js change
Next.js fixed 'use cache' / cacheLife so stale (not expired) entries are returned immediately while revalidation runs in the background, instead of awaiting regeneration before responding. Previously, dynamic/server-rendered routes blocked on revalidation and only then returned the stale value (worst of both worlds). Static pages also lacked true background SWR for 'use cache'.
Issue: #74882 — 'use cache' and cacheLife are not using stale data while revalidating in server-rendered (dynamic) routes
PR: #92636 — fix(use-cache): remove awaiting revalidation
Commit: a6223ac (merged to canary 2026-04-22)
Next.js files changed:
packages/next/src/server/use-cache/use-cache-wrapper.tstest/e2e/app-dir/use-cache-swr/use-cache-swr.test.tstest/e2e/app-dir/use-cache-swr/app/delayed/page.tsxRelated Next.js follow-up (route-handler response not blocking on pending waitUntil): #93189 / #93146 — already tracked/closed on vinext as #959.
Why this matters to vinext
vinext still has the pre-fix behavior for "use cache". In packages/vinext/src/shims/cache-runtime.ts, a shared-cache hit is only returned when existing.cacheState !== "stale". Once the entry is stale, the runtime falls through and awaits runCachedFunctionWithContext(...) — there is no path that returns the stale value and schedules a background refresh.
// packages/vinext/src/shims/cache-runtime.ts (HIT gate)
existing.cacheState !== "stale" &&
// ...
// Cache miss (or stale) — execute with context
const { result, ctx, effectiveLife } = await runCachedFunctionWithContext(...)Source: cloudflare/vinext