CONCEPT Cited by 1 source
Worker-owned cache¶
Definition¶
Worker-owned cache is the ownership model where a cache belongs to the Worker (compute unit), not to a zone, hostname, or CDN configuration surface. The cache follows the Worker wherever it runs — across custom domains, workers.dev, preview URLs, service bindings, and multi-tenant platforms — and is configured exclusively by the Worker's response headers.
Properties¶
- No zone configuration to manage — Cache Rules, Page Rules, file-extensions lists do not apply. The Worker's
Cache-Controlheaders are the sole configuration surface. - Follows the Worker, not the hostname — A Worker bound to multiple hostnames or invoked over a service binding shares one cache across all ingress paths.
- Works everywhere — Functions on
workers.dev, in preview URLs (each preview gets its own isolated cache), and in Workers for Platforms (each tenant Worker has its own cache). - Scoped purges —
ctx.cache.purge({ purgeEverything: true })only purges the calling Worker's entrypoint's cache. No risk of nuking other Workers' or zone-level cached content. - Code is the configuration — Which paths get longer TTLs, which requests bypass cache, how the cache key is shaped — all expressed as Worker code, not dashboard settings.
Contrast with zone-owned caching¶
| Axis | Zone-owned (traditional CDN) | Worker-owned |
|---|---|---|
| Config surface | Dashboard rules, Page Rules, API | Response headers in code |
| Scope | Per-hostname or per-zone | Per-Worker entrypoint |
Works on workers.dev |
No | Yes |
| Preview isolation | No | Yes (per-preview cache) |
| Multi-tenant isolation | Manual cache-key rules | Automatic via ctx.props |
| Purge blast radius | Entire zone | Single entrypoint |
Seen in¶
- systems/cloudflare-workers-cache — the first production implementation of worker-owned caching (2026-07-06). (Source: sources/2026-07-06-cloudflare-workers-cache)