Skip to content
Guides1 min read

How Octri Keeps Static Pages Fresh with ISR

Share

A look at how incremental static regeneration and on-demand revalidation give you static-fast pages that update the moment your content changes.

How Octri Keeps Static Pages Fresh with ISR

Static pages are fast because there is nothing to compute at request time. The classic trade-off is staleness. Incremental static regeneration (ISR) plus on-demand revalidation removes it.

The two halves

  1. ISR serves a cached, statically-rendered page and rebuilds it in the background on a time interval.
  2. On-demand revalidation lets a content change push an update immediately, instead of waiting for the interval.

Together you get pages that are static-fast and never meaningfully stale.

How the blog uses it

When you run the sync script, it tells the API which articles changed. The API purges its own cache and forwards the changed slugs to the frontend, which revalidates only those pages:

typescript
// Only the pages that actually changed are purged.
revalidateTag("blog");
for (const slug of slugs) revalidateTag(`blog:${slug}`);

The result: publish a post, run one command, and the new article is live in seconds, with every other page still served from cache.

When to reach for it

  • Content-heavy pages that change occasionally (docs, blogs, marketing)
  • Anything where SEO and time-to-first-byte matter
  • Workflows where a script or CMS webhook can signal "this changed"

If your content changes on every request, ISR is the wrong tool. Reach for dynamic rendering instead.

Share

Octri