next.js
19bc1acc - fix: unstable_cache should perform blocking revalidation during ISR revalidation (#83820)

Commit
125 days ago
fix: unstable_cache should perform blocking revalidation during ISR revalidation (#83820) When ISR revalidation occurs and `unstable_cache` entries are stale, Next.js returns stale cached data instead of waiting for fresh data. This differs from fetch() behavior, which performs foreground revalidation during ISR ([ref](https://github.com/vercel/next.js/blob/canary/packages/next/src/server/lib/patch-fetch.ts#L936-L939)). This PR adds similar handling to ensure that when we're revalidating an ISR page, we ensure any stale `unstable_cache` entries are revalidated before returning the final response. Fixes NEXT-4693
Author
Parents
Loading