Skip to content

CONCEPT Cited by 1 source

Incremental Static Regeneration

Definition

Incremental Static Regeneration (ISR) is a caching strategy — popularised by Next.js — in which a page is:

  1. Rendered on first request (or at deploy time).
  2. Cached with an explicit revalidation window.
  3. Served from cache to subsequent requests within the window.
  4. Re-rendered in the background when the window expires or an explicit revalidation is triggered.

Trades off freshness vs. render cost: ISR pays the render cost once per revalidation window, not once per request.

ISR in vinext

vinext supports ISR out of the box via the KVCacheHandler plugged into Next.js's setCacheHandler() API:

setCacheHandler(new KVCacheHandler(env.MY_KV_NAMESPACE));

"After the first request to any page, it's cached and revalidated in the background, just like Next.js. That part works today."

Complementary to vinext's Traffic-aware Pre-Rendering: TPR pre-renders the high-traffic head at deploy time; ISR fills in the long tail on first request.

Cache substrate choice

vinext's cache layer is pluggable per patterns/pluggable-cache-handler:

  • KV — good default for most apps.
  • R2 — better for large cached payloads.
  • Cloudflare Cache API — forthcoming, lower-config option.

Seen in

Last updated · 200 distilled / 1,178 read