Skip to content

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

  1. No zone configuration to manage — Cache Rules, Page Rules, file-extensions lists do not apply. The Worker's Cache-Control headers are the sole configuration surface.
  2. 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.
  3. 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).
  4. Scoped purgesctx.cache.purge({ purgeEverything: true }) only purges the calling Worker's entrypoint's cache. No risk of nuking other Workers' or zone-level cached content.
  5. 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

Last updated · 568 distilled / 1,686 read