Incremental Static Regeneration
Serving a cached static page while regenerating it in the background after a chosen interval.
Incremental static regeneration is a hybrid of static and dynamic rendering: a page is generated once and served from cache, and after a configured interval the next request triggers a background regeneration while still being served the stale copy. Visitors always get a fast response; the content converges on fresh.
It is the standard answer for pages built from data that changes on a scale of minutes to hours — a feed of repository activity, a list of recent posts, anything drawn from a third-party API. It removes per-request latency and, just as importantly, removes the API from the critical path: if the upstream is down, the cached page still serves.
Two things are worth designing deliberately. The interval encodes how stale you are willing to be, and different data on one page may deserve different intervals. Invalidation is the escape hatch for content that must update immediately — tagging cached entries and purging by tag beats waiting for a timer. See Cache Invalidation.
The failure mode to watch for is caching that is not request-aware. A value memoised in module scope looks like a cache and behaves like one within a single process, but it does not participate in the platform's revalidation and does not invalidate across instances — which is a correctness problem, not a performance one.
See also4
Hand-picked in the note itself — the neighbours worth reading next.
Static Site Generation
Rendering every page to a file at build time, so serving is just handing over bytes.
Web Platform12 connections
Cache Invalidation
Deciding when a cached value has stopped being correct — famously one of the hard problems.
Web Platform11 connections
Server-Side Rendering
Producing a page's HTML on the server so the first response is already content.
Web Platform18 connections
React Server Components
Components that execute only on the server and never ship their code to the browser.
Web Platform16 connections
Related5
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from5
Notes elsewhere in the wiki that reach for this one.
- Cache InvalidationWeb Platform
Deciding when a cached value has stopped being correct — famously one of the hard problems.
- React Server ComponentsWeb Platform
Components that execute only on the server and never ship their code to the browser.
- RSSData & Content
A syndication format letting readers subscribe to a site without an intermediary.
- Server-Side RenderingWeb Platform
Producing a page's HTML on the server so the first response is already content.
- Static Site GenerationWeb Platform
Rendering every page to a file at build time, so serving is just handing over bytes.