CDN not caching after switching to R2


After switching our origin to Cloudflare R2, I’m seeing a huge number of misses on a daily basis. I’ve set caching rules to cache everything in the edge as well as browser for one year as well as ignore all query strings, but still I’m seeing constant misses all the time.

I’ve manually checked by reloading a page several times and see that the content cache is hit. But after a few hours or more, the content will no longer hit the cache and show as missing again, even though the max_age has been set to “604800”

I’m really stumped as to why Cloudflare isn’t properly caching the contents after switching to R2. Can someone please help me out with this issue? I’ve created a Cloudflare ticket but no helpful response so far.

Thank You!

Caching the R2 objects should be done via Cache API / Workers.

What’s the value of the cf-cache-status HTTP header for the resource?

The HTTP header is CF-Cache-Status: MISS even though I’ve accessed this resource about an hour ago. And the max age is set to one year.

Btw I’ve also activated Argo cache already, so not sure why the cache is always miss after switching to R2.