Getting unexpected MISS when using Cache Reserve

We're using CDN with Cache Reserve to serve large binary files. I'm confused by the HIT/MISS behavior. Our setup - We host large files on Google Cloud Storage in private buckets - We serve it through Cloudflare using a CNAME record on a subdomain cdn.ourdomain.com - We enabled Cache Reserve to also cache large files - We use GCS signed URLs to allow access to these files - We have tried with "Tiered Cache" either enabled or disabled, it didn't change the observations below What I observe downloading a 2GB file from cdn.mydomain.com - It always returns MISS, no matter how many times i download it - However, after the first download, I see the "Egress savings (bandwidth)" and "Requests served by Cache Reserve" in the Cache Reserve page increase every time I hit the file, closely matching what I download - If I delete the file from GCS, I instantly get a 404 when trying to download the file again Why I'm confused - Since the file seems to be served from Cache Reserved (according to the "Egress savings" metrics), I don't understand why I get cf-cache-status: MISS? - Why do I immediately get 404s right after deleting the file in GCS: does it mean Cache Reserve does a HEAD request every time the file is downloaded? Trying the exact same setup with an 80MB file, I get HITs after the initial requests, and if I delete the file from GCS I can still download it until the cache expires.
2 Replies
MasterScrat
MasterScrat3mo ago
But then how come the "Egress savings" does increase when serving >512mb files? According to the documentation:
Cache Reserve file limits are the same as R2 limits. Note that CDN cache limits still apply. Assets larger than standard limits will not be stored in the standard CDN cache, so these assets will incur Cache Reserve operations costs far more frequently.
R2 limits are up to 5 TiB per object
damulle
damulle3mo ago
Update: Writing here as a colleage of @MasterScrat. As it turns out we get HITs when changing from "Full (Strict)" TLS/SSL settings to "Flexible". Does anyone know why TLS settings could impact Cache Reserve behavior?