Skip to content

Command Palette

Search for a command to run...

2
All posts

Engineering

Fixing Next.js ISR Cache on Cloudflare

How TentUI's daily GitHub-star revalidation exposed a read-only OpenNext cache.

SS
Sourabh SoniUpdated July 25, 2026

The failure

TentUI's GitHub star count is cached for one day. When that cache became stale, production requests started failing because the OpenNext setup could read build-time assets but could not write regenerated entries or coordinate revalidation.

The fix

The site combined time-based revalidation with a read-only incremental cache and no production-ready queue. The fix was to use R2 as the writable incremental cache and an OpenNext Durable Object queue to coordinate regeneration.

Read the full investigation

The complete article covers the production evidence, failure chain, corrected Cloudflare configuration, and stale-to-fresh verification process.

Read the full article on srb.codes

Command Palette

Search for a command to run...