Cache Response Rules Can Be Versioned Now!
Hey there, it's me, Shiichan! Today I found a caching update that's a little low-key but genuinely handy for day-to-day operations, so let me tell you about it.
Cloudflare ChangelogWhat was announced?
On the Cloudflare Changelog, there's news that Cache Response Rules now support Version Management.
Cache Response Rules let you adjust cache behavior at the response phase. You can rewrite Cache-Control directives, manage cache tags, and strip specific headers. With this update, those rules are now fully integrated into the zone versioning workflow.
The story so far
Until now, Cache Response Rules were left out of zone versioning. That meant any change you made applied globally right away, so you couldn't do the usual "test in staging, then ship to production" dance.
Request-phase rules, called Cache Rules, already supported versioning, so only the response-phase rules were left behind. This update closes that gap and brings them in line.
What changes
From now on, you can test response-phase cache settings safely, separated per environment.
For example, you could set up an environment-specific rule like "strip the Set-Cookie header only in staging," and verify it before it reaches production. Not having to push changes straight to production is a real relief for anyone running this stuff.
Dive Deep
Under the hood, Cache Response Rules are integrated into the Version Management workflow, so you can promote settings on an environment basis. You build your config in staging, and once it checks out, you carry it over to production.
You can work with this from the Cloudflare dashboard, and also through the Rulesets API. For the details of the rules themselves, the Cache Response Rules documentation has it all, so take a peek if you're curious.
Wrap-up
- Cloudflare's Cache Response Rules now support Version Management
- Previously they were excluded from versioning, so changes applied globally right away
- Now you can split response-phase cache settings per environment and test them in staging before production
- They line up with request-phase Cache Rules for a consistent workflow
This one quietly pays off for operators who tune response-phase cache settings on Cloudflare!