Caching HTML in Cache Reserve

I’m curious if Cache Reserve supports HTML files—made eligible for cache through a Cache Rule—as I want to fully shield our origin server from unnecessary requests except after I manually purge cache on content updates. I’m running an Astro server in SSR mode (so content editors can update the content) and assumed that Cache Reserve could do so as long as the files were marked as Eligible for Cache Reserve by a Cache Rule and have the correct Content-Length header, as outlined in the docs.

However, even with the Content-Length header being returned from the origin (which is just a Cloudflare pages domain) and the HTML files clearly cacheable (as I’m receiving cf-cache-status: HIT/MISS ), my Cache Reserve shows 0B stored and 0 requests regardless. I’ve made all assets on my domain (by hostname) Eligible for Cache Reserve and Eligible for Cache. I don’t know what more I can try to get the Cache Reserve to store my HTML files. Is this just a lost cause ? Has anyone managed to cache HTML files up on Cache Reserve?

1 Like

Hi @evankirkiles

I can’t see you have activated cache reserve in your account, so it’s not possible to continue troubleshooting.

Oh, sorry for the confusion—I am referring to a Cache Reserve in a client’s Cloudflare account (I can specify which account privately). That being said, I have since given up on HTML in Cloudflare’s Cache Reserve and instead implemented my own HTML-enabled version of a Cache Reserve on top of R2 which seems to be working well, at least for the time being. If it is true that I got some sort of small configuration property wrong and could not cache HTML in the Cache Reserve because of this, I’d still love to switch back over to Cache Reserve for the LTS.

Can you confirm that Cloudflare is able to cache HTML in the Cache Reserve (have you seen it done before)? If so, the documentation around this is quite sparse, and could definitely use imrpoving—I tried every permutation of configurations and cache control headers I could think of without any success populating the Cache Reserve.

@louise2 any update on this topic? We’d like to cache HTML files with Cache Reserve as well, but the cache simply does not populate. The docs do not have any guidance for this scenario either. Thanks!

For context, we use a simple Cache Rule to ensure all content (HTML included) are cached. But when enabling Cache Reserve, it appears to not respect that rule, the current “Data Stored” from Cache Reserve Analytics remains 0B.