Next.js ISR & Build Logs: diagnosing deployment failures and resolving revalidation strategy
0 reputation · 19 Sept 2024, 12:42 UTC
Goal
Identify why a statically generated page deployed with Next.js ISR continues to serve stale content after an underlying CMS update, despite a successful build log.
Constraints & Uncertainty
The build logs show no syntax or dependency errors, yet the page’s cache headers indicate it was served from the edge without regeneration. The documented ISR feature allows a per‑page revalidate value, but the impact on edge cache invalidation when the data source changes during the revalidation window remains ambiguous. Additionally, Next.js does not expose a universal revalidation interval across all pages, raising questions about how a global setting would interact with per‑page configurations.
Unresolved Questions
- When a page’s
revalidateperiod expires, how does Next.js ISR determine whether to trigger a regeneration if the underlying data source has been updated? - Is there support for a global revalidation interval that applies to all ISR pages, and what would be its effect on edge cache consistency?
- What specific log entries or response headers can conclusively confirm that ISR has executed a regeneration versus serving cached content?