Does Cache Reserve support HTML files?
I'm curious if Cache Reserve supports HTML files, as I want to fully shield our origin server from unnecessary requests after I manually purge 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.
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 ?3 Replies
example headers returned from my origin when requesting without transform encoding:
is there something i'm doing wrong?
yep, I've got one of those in place. caching works correctly, but cache MISSes are getting sent all the way back to the origin and the Cache Reserve is never brought into the picture (it's still sitting at 0B of data stored with 0 requests). i've enabled both Tiered Caching and Cache Reserve, and have a "Eligible for Cache" Cache Rule (not Page Rule) that is working for my HTML files
i'm setting
Content-Length
and everything, which is making me worry that the Cache Reserve for some reason only respects the default cache behaviors and content types, and won't actually cache HTML resources even if you mark them as "Eligible for Cache" with a Cache Rule
wondering if anyone else has successfully cached HTML documents—it seems like a no-brainer to have implemented, as this would instantly make obsolete many of the (for example) existing WordPress server cache pluginssame question can't get to work to cache an HTML page on Browser , I can on Edge
and doing a Cache Rule the Free minimal is 2 hours but I want 10 minutes
This isn't the same question, could you open a separate thread with more information?
I did some tests on my personal blog earlier and it appeared to be using cache reserve as expected, do you have a test url set up that I can check?