Cache - Invalidate cached content instead of purging it
- Announced
- Tags
- Cache
- Severity
- info, set by
reef/rss-rule-v1 - Source
- https://developers.cloudflare.com/changelog/post/2026-09-28-cache-invalidation/
<p>You can now invalidate cached content instead of purging it. Invalidation marks matching content as stale. On the next request, Cloudflare revalidates the content with your origin. If your origin responds with <code>304 Not Modified</code>, Cloudflare reuses the cached content instead of downloading it again.</p> <p>Use invalidation to refresh a group of assets when only some of them have changed. For example, invalidate all content that shares a cache tag. Cloudflare reuses unchanged assets instead of downloading them again. This requires your origin to return an <code>ETag</code> or <code>Last-Modified</code> header and support conditional requests.</p> <p>Invalidation supports the same selectors as purge: URLs, cache tags, hostnames, URL prefixes, and everything. To invalidate content, send a <code>POST</code> request to the new <code>invalidate_cache</code> endpoint:</p> <figure class="nb-code-figure" data-nb-lang="bash"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="bash" data-nb-lang="bash"><code><span class="line"><span class="nb-shiki-1t8gfj">curl</span><span class="nb-shiki-dzsirb"> --request</span><span class="nb-shiki-mdbnqw"> POST</span><span class="nb-shiki-dzsirb"> \</span></span> <span class="line"><span class="nb-shiki-mdbnqw"> "https://api.cloudflare.com/client/v4/zones/</span><span class="nb-shiki-140thh">$ZONE_ID</span><span class="nb-shiki-mdbnqw">/invalidate_cache"</span><span class="nb-shiki-dzsirb"> \</span></span> <span class="line"><span class="nb-shiki-dzsirb"> --header</span><span class="nb-shiki-mdbnqw"> "Authorization: Bearer </span><span class="nb-shiki-140thh">$CLOUDFLARE_API_TOKEN</span><span class="nb-shiki-mdbnqw">"</span><span class="nb-shiki-dzsirb"> \</span></span> <span class="line"><span class="nb-shiki-dzsirb"> --header</span><span class="nb-shiki-mdbnqw"> "Content-Type: application/json"</span><span class="nb-shiki-dzsirb"> \</span></span> <span class="line"><span class="nb-shiki-dzsirb"> --data</span><span class="nb-shiki-mdbnqw"> '{"tags":["product-images"]}'</span></span></code></pre></figure> <p>In the dashboard, use <strong>Invalidate Cache</strong> on the <strong>Caching</strong> > <strong>Configuration</strong> page.</p> <p>Your cache settings determine whether Cloudflare serves stale content while it revalidates. Cloudflare can also serve invalidated content stale if your origin returns a <code>5xx</code> error or cannot be reached. To stop serving cached content, purge it instead.</p> <p>Invalidation requests count toward the same <a href="https://developers.cloudflare.com/cache/guides/invalidate-cache/#limits">rate limits</a> as purge requests.</p> <p>Purge behavior for Cache Reserve also changes with this release. For details, refer to <a href="https://developers.cloudflare.com/cache/advanced-configuration/cache-reserve/#purge-behavior">Cache Reserve purge behavior</a>.</p> <p>For more information, refer to <a href="https://developers.cloudflare.com/cache/guides/invalidate-cache/">Invalidate cached content</a>.</p>
The text above is the source's. reef added the severity, the dates it could read from the text, and the endpoints and scopes named in code.