# There is no ISR on Cloudflare

> For agents: start with the [agent guide](https://ratstack.sh/llms.txt). Every page is Markdown by default; add `Accept: text/html` for HTML.

New on /news: [Foldkit 0.171.0 requires result Message schemas](/news).

ISR means incremental static regeneration: storing generated content and refreshing it later.
A Cloudflare Worker runs request-handling code. Its entrypoint is where that code starts.

There is no SvelteKit `isr` switch for the Cloudflare adapter. [That configuration belongs to adapter-vercel](https://svelte.dev/docs/kit/adapter-vercel).

[Vercel ISR](https://vercel.com/docs/incremental-static-regeneration) stores generated content and regenerates it. [Kit #661](https://github.com/sveltejs/kit/issues/661) asks for a general regeneration feature.

Cloudflare can still cache rendered pages.

[Workers Cache](https://blog.cloudflare.com/workers-cache/) puts a cache in front of a Worker entrypoint. Its [stale-while-revalidate behavior](https://developers.cloudflare.com/workers/cache/) serves a stale response while the Worker refreshes it.

## What our comparison proves

We compare three local candidates:

- A static-assets gateway.
- A SvelteKit prerender gateway.
- A Workers Cache entrypoint.

The cache candidate creates a marker inside the rendering entrypoint. Repeated identical requests do not reuse it.

An assets response carries `CF-Cache-Status: HIT`. That proves only asset-cache reuse. The selected Miniflare implementation does not implement Workers Cache handling.

The cache candidate's home-page Markdown timings are:

- **Cold: first application request in a fresh runtime**: 8.25 ms
- **Warm: median of 20 sequential requests**: 1.69 ms

Neither number measures reuse of a cached response in Cloudflare's data centers (`HIT`).

The check does not prove:

- Stale-while-revalidate.
- Purge.
- Separate caching for HTML and Markdown responses across Workers Cache HITs.

The accepted configuration leaves cache behavior unproven.

## What we choose

We choose [static assets](https://github.com/joelhooks/rat-stack/commit/a337a96). [`apps/site/src/static-assets.ts`](https://github.com/joelhooks/rat-stack/blob/main/apps/site/src/static-assets.ts) serves separate HTML and Markdown assets. The dynamic signup page stays outside that path.

See [Worker init runs twice](/lore/init-runs-twice) for another boundary a local check can miss.

## Sources

1. [SvelteKit Vercel adapter](https://svelte.dev/docs/kit/adapter-vercel)
   Primary source. SvelteKit Vercel adapter Accessed 2026-10-02.

2. [Vercel ISR](https://vercel.com/docs/incremental-static-regeneration)
   Primary source. Vercel ISR Accessed 2026-10-02.

3. [Add incremental static regeneration](https://github.com/sveltejs/kit/issues/661)
   GitHub. Add incremental static regeneration Accessed 2026-10-02.

4. [Workers Cache announcement](https://blog.cloudflare.com/workers-cache/)
   Primary source. Workers Cache announcement Accessed 2026-10-02.

5. [Workers Cache documentation](https://developers.cloudflare.com/workers/cache/)
   Primary source. Workers Cache documentation Accessed 2026-10-02.

6. [apps/site/src/static-assets.ts](https://github.com/joelhooks/rat-stack/blob/main/apps/site/src/static-assets.ts)
   GitHub. apps/site/src/static-assets.ts Accessed 2026-10-02.

7. [Serve static assets through Effect HTTP composition](https://github.com/joelhooks/rat-stack/commit/a337a96)
   GitHub. Serve static assets through Effect HTTP composition Accessed 2026-10-02.

## Lore on this page

- [Workers answer requests; Durable Objects own named state](/lore/workers-answer-requests-durable-objects-own-named-state)

## Linked from

- Agent guide → An Effect stack so pure (aspirational) Kit Langton will blush. → [Read page](https://ratstack.sh/llms.txt)

- Change log → What changed in the files served here, newest first. → [Read page](https://ratstack.sh/log)

- Full agent guide → An Effect stack so pure (aspirational) Kit Langton will blush. → [Read page](https://ratstack.sh/llms-full.txt)

- Rat Stack lore | rat-stack → Short, source-grounded notes on the ideas and decisions behind rat-stack. → [Read page](https://ratstack.sh/lore)

- Source change history (log.md) → The generated change log as Markdown. → [Read page](https://ratstack.sh/log.md)
