Cache Rule Not Working

I'm hosting HLS video streams in R2 and delivering via custom domain and CloudFront CDN. I have a cache rule setup to add .m3u8, .ts, and .aac file extension rules to be cached but I am not seeing any caching taking place (i.e. responses continually show DYNAMIC in cf-cache-status response header). How can I debug/troubleshoot this and determine what I'm missing. I just want standard caching but for non-default file extensions, and using cache rule(s) preferably
9 Replies
Chaika
Chaika15mo ago
Are they larger then the 512mb cache limit? Only Enterprise gets larger then that You could otherwise try trace (account level -> trace) and see if it hits or not, or a screenshot of the rule
R2 and delivering via custom domain and CloudFront CDN.
I assume you mean Cloudflare?
Austin B
Austin BOP15mo ago
Sorry yes I meant CloudFlare . And no these files are well under that limit. Most under 1MB
Chaika
Chaika15mo ago
What does your cache rule look like?
Austin B
Austin BOP15mo ago
I do have one worker route that fires on these but it doesn’t interact with cache. I’ll try to disable it just to be sure though. I’ll send a screenshot of cache rule in a bit. Didn’t know about the trace thing. I’ll have to try that as well
Austin B
Austin BOP15mo ago
No description
Austin B
Austin BOP15mo ago
No description
Austin B
Austin BOP15mo ago
I also have the done default as ignore query string for cache level Zone default *
Chaika
Chaika15mo ago
Depends what the worker does, if it just fetches through return fetch(request), cache should be unaffected, but workers themselves cannot be cached That rule looks sane, what's a link to one of those videos that should be cached?
Austin B
Austin BOP15mo ago
https://fusion05.com/476880/384fa101-5a17-48ac-adc0-3ddccd4c6923/hls/index.m3u8 I disabled the worker just to eliminate that variable

Did you find this page helpful?