Skip to content

[Workers] Document Workers Caching#30018

Open
danlapid wants to merge 1 commit intoproductionfrom
dlapid/workersCache
Open

[Workers] Document Workers Caching#30018
danlapid wants to merge 1 commit intoproductionfrom
dlapid/workersCache

Conversation

@danlapid
Copy link
Copy Markdown
Contributor

Add docs for Workers Caching — caching HTTP responses from a Worker so that Cloudflare serves them without executing the Worker.

New pages under src/content/docs/workers/cache/:

  • configuration.mdx — enabling caching, Cache-Control semantics, TTL and stale-while-revalidate guidance, cf-cache-status, Cache-Tag
  • cache-keys.mdx — what the cache key includes, multi-tenant safety with ctx.props, invalidating cache across deployments
  • purge.mdx — ctx.cache.purge() with tags, pathPrefixes, and purgeEverything; versioned purging with the version metadata binding
  • debugging.mdx — diagnosing why caching is not behaving as expected
  • limitations.mdx — unsupported scenarios, limits, relationship to zone cache, the Cache API, and fetch() subrequests

index.mdx as a landing page with a quickstart showing wrangler deploy + curl observing HIT/MISS, plus a Durable Object wrapping pattern for caching DO responses.

workers/platform/pricing.mdx gets a worked example showing CPU savings with an 80% cache hit rate.

Summary

Screenshots (optional)

Documentation checklist

  • Is there a changelog entry (guidelines)? If you don't add one for something awesome and new (however small) — how will our customers find out? Changelogs are automatically posted to RSS feeds, the Discord, and X.
  • The change adheres to the documentation style guide.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/cache/ @angelampcosta, @dcpena, @cloudflare/pcx-technical-writing, @cloudflare/product-owners
/src/content/docs/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @korinne, @WalshyDev, @cloudflare/deploy-config, @cloudflare/pcx-technical-writing, @cloudflare/product-owners, @cloudflare/wrangler, @mattietk, @cloudflare/dev-plat-leads

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

Preview URL: https://fe7dc096.preview.developers.cloudflare.com
Preview Branch URL: https://dlapid-workerscache.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/workers/cache/ https://dlapid-workerscache.preview.developers.cloudflare.com/workers/cache/
https://developers.cloudflare.com/workers/cache/purge/ https://dlapid-workerscache.preview.developers.cloudflare.com/workers/cache/purge/
https://developers.cloudflare.com/workers/cache/configuration/ https://dlapid-workerscache.preview.developers.cloudflare.com/workers/cache/configuration/
https://developers.cloudflare.com/workers/cache/cache-keys/ https://dlapid-workerscache.preview.developers.cloudflare.com/workers/cache/cache-keys/
https://developers.cloudflare.com/workers/cache/debugging/ https://dlapid-workerscache.preview.developers.cloudflare.com/workers/cache/debugging/
https://developers.cloudflare.com/workers/cache/limitations/ https://dlapid-workerscache.preview.developers.cloudflare.com/workers/cache/limitations/
https://developers.cloudflare.com/workers/platform/pricing/ https://dlapid-workerscache.preview.developers.cloudflare.com/workers/platform/pricing/
https://developers.cloudflare.com/workers/reference/how-the-cache-works/ https://dlapid-workerscache.preview.developers.cloudflare.com/workers/reference/how-the-cache-works/
https://developers.cloudflare.com/cache/interaction-cloudflare-products/workers/ https://dlapid-workerscache.preview.developers.cloudflare.com/cache/interaction-cloudflare-products/workers/
https://developers.cloudflare.com/workers/runtime-apis/cache/ https://dlapid-workerscache.preview.developers.cloudflare.com/workers/runtime-apis/cache/

Add docs for Workers Caching — caching HTTP responses from a Worker
so that Cloudflare serves them without executing the Worker.

New pages under src/content/docs/workers/cache/:

- configuration.mdx — enabling caching, Cache-Control semantics,
  TTL and stale-while-revalidate guidance, cf-cache-status, Cache-Tag
- cache-keys.mdx — what the cache key includes, multi-tenant safety
  with ctx.props, invalidating cache across deployments
- purge.mdx — ctx.cache.purge() with tags, pathPrefixes, and
  purgeEverything; versioned purging with the version metadata binding
- debugging.mdx — diagnosing why caching is not behaving as expected
- limitations.mdx — unsupported scenarios, limits, relationship to
  zone cache, the Cache API, and fetch() subrequests

index.mdx as a landing page with a quickstart showing wrangler deploy +
curl observing HIT/MISS, plus a Durable Object wrapping pattern for
caching DO responses.

workers/platform/pricing.mdx gets a worked example showing CPU savings
with an 80% cache hit rate.
@danlapid danlapid force-pushed the dlapid/workersCache branch from 1819b5e to fe7dc09 Compare May 7, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:cache Issues or PRs related to Cache product:workers Related to Workers product size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants