Cache Reserve Not Caching assets for more than a day

I’m using cache reserve with tiered cache activated. Should be perfect for my site with low traffic

Pages rules specify Cache Everything & Edge Cache TTL is 2419200 seconds.

I’m testing on GT Metrix:

After warming up the cache I’m getting cf-cache-status=HIT on all the expected assets but when I’m testing the same page the next day I’m getting a cf-cache-status=MISS on lots of assets. I was expecting to get a cache status of HIT for the next 30 days.

Note that I’ve turned off the caching plugin (WP Rocket) so I’ve eliminated this as the source of the problem

Here are the results for 2 pages 24 hrs apart on GT Metrix

As you can see, I’m getting a CF-cache status = HIT on all the assets that should be cached.

Now I rerun the reports of GT Metrix for those 2 pages 24 hours later: Here are the results

As you can see, I’m getting lots of `misses’. Indeed, on one page I even get a miss on the HTML element.

Here are the stats from Cloudflare. Bear in mind that this site is not live & not indexed by Google therefore traffic is very low:

Overview for last 24 hrs
Total Requests
2.17k

Percent Cached
78.17%

Total Data Served
23 MB

Data Cached
18 MB

Cache Reserve

Cache sync:
Cached assets are being copied to a storage bucket

Current data stored:
2.7 MB
1 Oct – 11 Oct usage for kernowdirectmarketing.co.uk

Aggregate storage usage:
5.53 MB-days
Read operations:
0
Write operations:
0

Any ideas to help me solve this would be greatly appreciated

Many thanks
Kevin

2 Likes

Were you able to get this resolved? I’m experiencing a similar problem, except that in my case none of the assets are getting saved to Cache Reserve at all:

Aggregate storage usage:
3.63 MB-days
Read operations: 0
Write operations: 0

1 Like

Raz

Thanks for your reply. I haven’t got it resolved yet. It sounds like you might have a similar problem to me. I’m on holiday at the moment so having a Cloudflare free few days. Is it OK if I contact you when I get back ? Two brains solving this might be better than one ! :smiley:

I’m not convinced that the cache reserve is working at all as I see no reads or writes over the last month. I also see the same symptoms as you describe, an asset will be dropped from cache within 24 hours. As an example:

HTTP/2 200
date: Sun, 23 Oct 2022 12:57:19 GMT
content-type: image/jpeg
content-length: 59155
x-bz-file-name: avatars/generated/image108.jpg
x-bz-file-id: 4_z22eb3e566fe8e3d97598061d_f102fc2fa1162d91c_d20221019_m135502_c000_v0001067_t0038_u01666187702006
x-bz-content-sha1: 9053b2aeca123a00b147445a787d1c7701614a92
x-bz-upload-timestamp: 1666187702006
cache-control: max-age=2678400
last-modified: Sun, 23 Oct 2022 12:57:19 GMT
cf-cache-status: MISS
accept-ranges: bytes
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=o9onCEAvi5oN70I6jiisMS5aubp6rlIv80%2BCG4eKopwYI5imbHPK4RhRIE%2Fudh9S0ct4mhTsHL7iGX2U8AK9GHLLKdN9WWoUoAAfQm6Aq3xtAqFYeGTNlFKRk%2FF%2Bs3KiWmd%2FQZE%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 75eaa34538b26312-ORD
1 Like

Thanks Raz

I’m not getting any other responses to this thread so this problem looks like it may be unique to you & I.

Could you send me your website URL ?

I am seeing this too. Hard to get a lot of visibility but it feels like cached assets clear in a day. I have not seen much of an improvement in cache misses.

1 Like

Images clear the quickest …usually go from HIT to MISS within a few hours. As I’m using Wordpress, I’ve now transferred them to the Optimole Image Optimisation plugin because they get served FOC from the Amazon CDN. It’s not a quick as Cloudflare when the images are cached but it quicker when they are not.

I also use the Super Page Cache for Cloudflare plugin for the page caching. That at least ensures that the html is almost permanently cached so the TTFB is nearly always very low.

As the for the caching of JS & CSS etc, I have’nt got a clue why the assets are cached for such a short time. I’ve changed & switched on & off different caching plugins & checked & rechecked my .htaccess but without success.

What confuses me further is that on the Overview page I’ve regularly getting cached rates of up to 85% so that kinda suggests everything is working well, but it’s not.

1 Like

From the two urls you posted above:

Data Cleansing | KDM
Data Migration | KDM

those two urls are not returning content-length which makes them not eligible for cache reserve per Cache Reserve (beta) · Cloudflare Cache docs

This response is interesting because at first glance it appears to meet the requirements to make something eligible for cache reserve (Cache Reserve (beta) · Cloudflare Cache docs). Would you be able to provide a url so we can take a closer look here

Hello Raz

Thanks for reaching out. Here’s the URL. I’d really appreciate your feedback

It’s https:\www.kernowdirectmarketing.co.uk

This url also doesn’t have content-length so it’s also not eligible to be cached per Cache Reserve (beta) · Cloudflare Cache docs