{"id":311,"date":"2026-03-24T00:00:00","date_gmt":"2026-03-24T00:00:00","guid":{"rendered":"https:\/\/wordpress.securinsight.ca\/index.php\/2026\/03\/24\/cache-cache-response-rules\/"},"modified":"2026-03-24T00:00:00","modified_gmt":"2026-03-24T00:00:00","slug":"cache-cache-response-rules","status":"publish","type":"post","link":"https:\/\/wordpress.securinsight.ca\/index.php\/2026\/03\/24\/cache-cache-response-rules\/","title":{"rendered":"Cache &#8211; Cache Response Rules"},"content":{"rendered":"<p>You can now control how Cloudflare handles origin responses without changing your origin. Cache Response Rules let you modify <code>Cache-Control<\/code> directives, manage cache tags, and strip headers like <code>Set-Cookie<\/code> from origin responses <em>before<\/em> they reach Cloudflare&#8217;s cache. Whether traffic is cached or passed through dynamically, these rules give you control over origin response behavior that was previously out of reach.<\/p>\n<h4>What changed<\/h4>\n<p>Cache Rules previously only operated on request attributes. Cache Response Rules introduce a new response phase that evaluates origin responses and lets you act on them before caching. You can now:<\/p>\n<ul>\n<li><strong>Modify <code>Cache-Control<\/code> directives<\/strong>: Set or remove individual directives like <code>no-store<\/code>, <code>no-cache<\/code>, <code>max-age<\/code>, <code>s-maxage<\/code>, <code>stale-while-revalidate<\/code>, <code>immutable<\/code>, and more. For example, remove a <code>no-cache<\/code> directive your origin sends so Cloudflare can cache the asset, or set an <code>s-maxage<\/code> to control how long Cloudflare stores it.<\/li>\n<li><strong>Set a different browser <code>Cache-Control<\/code><\/strong>: Send a different <code>Cache-Control<\/code> header downstream to browsers and other clients than what Cloudflare uses internally, giving you independent control over edge and browser caching strategies.<\/li>\n<li><strong>Manage cache tags<\/strong>: Add, set, or remove cache tags on responses, including converting tags from another CDN&#8217;s header format into Cloudflare&#8217;s <code>Cache-Tag<\/code> header. This is especially useful if you are migrating from a CDN that uses a different tag header or delimiter.<\/li>\n<li><strong>Strip headers that block caching<\/strong>: Remove <code>Set-Cookie<\/code>, <code>ETag<\/code>, or <code>Last-Modified<\/code> headers from origin responses before caching, so responses that would otherwise be treated as uncacheable can be stored and served from cache.<\/li>\n<\/ul>\n<h4>Benefits<\/h4>\n<ul>\n<li><strong>No origin changes required<\/strong>: Fix caching behavior entirely from Cloudflare, even when your origin configuration is locked down or managed by a different team.<\/li>\n<li><strong>Simpler CDN migration<\/strong>: Match caching behavior from other CDN providers without rewriting your origin. Translate cache tag formats and override directives that do not align with Cloudflare&#8217;s defaults.<\/li>\n<li><strong>Native support, fewer workarounds<\/strong>: Functionality that previously required workarounds is now built into Cache Rules with full Tiered Cache compatibility.<\/li>\n<li><strong>Fine-grained control<\/strong>: Use expressions to match on request and response attributes, then apply precise cache settings per rule. Rules are stackable and composable with existing Cache Rules.<\/li>\n<\/ul>\n<h4>Get started<\/h4>\n<p>Configure Cache Response Rules in the <a href=\"https:\/\/dash.cloudflare.com\/?to=\/:account\/:zone\/caching\/cache-rules\" target=\"_blank\">Cloudflare dashboard<\/a> under <strong>Caching<\/strong> &gt; <strong>Cache Rules<\/strong>, or via the <a href=\"https:\/\/developers.cloudflare.com\/ruleset-engine\/rulesets-api\/\" target=\"_blank\">Rulesets API<\/a>. For more details, refer to the <a href=\"https:\/\/developers.cloudflare.com\/cache\/how-to\/cache-response-rules\/\" target=\"_blank\">Cache Rules documentation<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>You can now control how Cloudflare handles origin responses without changing your origin. Cache Response Rules let you modify Cache-Control directives, manage cache tags, and strip headers like Set-Cookie from origin responses before they reach Cloudflare&#8217;s cache. Whether traffic is cached or passed through dynamically, these rules give you control over origin response behavior that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-311","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/comments?post=311"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/posts\/311\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/media?parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/categories?post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/tags?post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}