#Does Cache Reserve support HTML files?

10 messages · Page 1 of 1 (latest)

rich berry
#

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 ?

#

example headers returned from my origin when requesting without transform encoding:

content-type: text/html
content-length: 83654
cdn-cache-control: public, max-age=31536000, stale-if-error=86400, stale-while-revalidate=3600

is there something i'm doing wrong?

abstract tree
#

Cf does not cache html my default. You need a cache rule to mark them as eligible for cache

rich berry
#

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 plugins

dreamy hinge
#

same 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

glacial lake