What's New
Cloudflare has released Cache Response Rules, extending its caching capabilities beyond request-level operations to now include response-level controls. This new feature lets you manipulate how Cloudflare handles origin responses before they enter the cache, without modifying your origin server configuration.
Key Capabilities
Cache Response Rules enable several powerful operations:
- Modify Cache-Control directives: Add, remove, or override individual directives such as
no-store,no-cache,max-age,s-maxage,stale-while-revalidate, andimmutable. For example, remove a restrictiveno-cachedirective to allow Cloudflare caching. - Independent browser caching: Set a different
Cache-Controlheader for downstream clients than what Cloudflare uses internally, giving you separate control over edge and browser cache strategies. - Manage cache tags: Add, set, or remove cache tags, including converting tags from other CDN formats into Cloudflare's
Cache-Tagheader—particularly useful during CDN migrations. - Strip blocking headers: Remove
Set-Cookie,ETag, orLast-Modifiedheaders from origin responses to enable caching of responses that would normally be treated as uncacheable.
Why This Matters
No origin changes required: Fix caching behavior entirely from Cloudflare's edge, even when your origin is locked down or managed by another team. This is especially valuable in large organizations with separated infrastructure teams.
Simpler migrations: If you're moving from another CDN, match their caching behavior and cache tag formats without rewriting your origin code.
Full compatibility: Rules work seamlessly with Tiered Cache and compose naturally with existing Cache Rules for fine-grained control across request and response phases.
Getting Started
Access Cache Response Rules in the Cloudflare dashboard under Caching → Cache Rules, or configure them programmatically via the Rulesets API. Refer to the Cache Rules documentation for detailed configuration guidance.