ยฉ 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developersโ€ข2y agoโ€ข
1 reply
PBarnsterChar

Cache rule not creating expected caching behaviour

Hey all,
I am having some confusing issues with caching requests that I am routing through a worker.

The setup I have is a Cloudflare worker at a custom domain - "something.com" - and a CNAME DNS record in the same zone which points the "origin.something.com" subdomain towards my AWS cluster. The worker handles the request and forwards it to "origin.something.com" by modifying the url of the request.

In my caching rules I have cache everything rule set on for requests matching "(http.request.full_uri contains "origin.something.com")", and a separate bypass cache rule for good measure with "(http.host eq "something.com")"

Therefore, my understanding would be that requests to something.com, hit cloudflare, bypass the cache, reach the worker, are forwarded to "origin.something.com", then hit the cache or sometimes miss and go to my AWS cluster.

However, currently all of my cache hits in the Caching overview show as having "something.com" as their host. Can anyway see what is going wrong here?
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

My Cache Rule is not caching
Cloudflare DevelopersCDCloudflare Developers / general-help
2y ago
Cache Rule Not Working
Cloudflare DevelopersCDCloudflare Developers / general-help
3y ago
Cloudflare Cache Not Caching
Cloudflare DevelopersCDCloudflare Developers / general-help
3y ago
Old Page Rule to new Caching rule
Cloudflare DevelopersCDCloudflare Developers / general-help
4mo ago