Why is my "Percent Cached" so low?

After 40 days on CF, my Percent Cached is around 10%. About 90% of my traffic are jpg files, there is around 20 GB jpg files on my site, the monthly traffic is around 50 GB, so on the average every file should have been read 2.5 times. These are response headers of a picture that has been on front page all this time, that is loaded whenever anyone visits front page:

cache-control: max-age=7776000, public
cf-cache-status: MISS
cf-ray: 62a120ebdbce7b4b-DME
cf-request-id: 089892e76800007b4b932b8000000001
content-length: 34788
content-type: image/jpeg
date: Wed, 03 Mar 2021 07:25:02 GMT
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
expires: Tue, 01 Jun 2021 07:25:02 GMT
last-modified: Thu, 24 Jan 2019 10:44:55 GMT
nel: {"report_to":"cf-nel","max_age":604800}
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=t%2FKcY4aJN8UkzX3lqxLK9SDei2hwyGGh%2FZS00NfCRVYqNxTper8pycUWOvPjNojs1Edxj%2FHc7Of6aTfnzBEKaYLCn21lTYNyooOBqv9UpEOBWA%3D%3D"}],"group":"cf-nel","max_age":604800}
server: cloudflare
vary: Accept-Encoding
x-content-type-options: nosniff

What am I doing wrong?

1 Like


Please tell us your domain if you feel comfortable to make it public.

Sure: https://art.nouveau.world

1 Like

Your site needs optimization…

Example: Optimize images
Images comprise a large percentage of Internet traffic, and they often take the longest to load on a website since image files tend to be larger in size than HTML and CSS files.




1 Like

What does that have to do with my question?

1 Like


As expected, I get a miss on the first call and a hit on the second call.
You said that each image on your site is viewed an average of 2.5 times per month.
It may be that this is too little and that’s why you have such a small cache hit ratio.
Cloudflares cache always stores an asset only in the datacenter where it was accessed.
If you now call your page, the loaded images are cached in the Cloudflare datacenter that answered you. If I call your page afterwards, they will most likely be retrieved from your server again because another Cloudflare data center is responsible for my call since I am in a different region.

In addition, the cache is discarded if it is not called regularly, so that there is room for high traffic pages in the cache of the respective data center. So if your page is accessed from too many different regions and there only once and then not for a long time, the standard cache brings you very little.

When your Website doesnt change often you could create a Cache-All Pagerule with a High Edge Cache TTL and Access the Images from time to Time from different Regions to prewarm the Cache. This way your Website visitors should have faster Load times.

Look into this Thread for more Information: Warming Up Cache Geographically Using Webpagetest

Hope this helps a Little

1 Like

Hi, thanks for your input.
I suppose that “average 2.5 times a month” in reality looks somewhat like this: quite a few images are never accessed at all, so don’t even count in the traffic, some images are only accessed once a month, so they are all MISS but there must be quite a lot of images on popular pages that are accessed much more often than twice a month. Every CF user I talked to says 10% is impossibly low and I must be doing something wrong. I’m just trying to figure out what.
All your points are valid(and well known to me) but I guess they must be valid for pretty much any site, so I am trying to figure out what makes my site so different.

the cache is discarded if it is not called regularly

As far as I know CF doesn’t publicly specify how regularly is “regularly”.

I did experiment with page rules but the max Edge TTL you can set is 1 month which is less than my current Cache-control max-age. Did not see any effect whatsoever, so disabled those page rules in favor of default.
Pre warming the cache is an interesting idea but it might backfire by creating even more traffic from my site fetching images no one is going to ask for except me…
Maybe my site usage profile is indeed ill suited for CF caching with many different visitors accessing mostly different files from different parts of the world.
Maybe I should dump CF and follow the Dot’s advice of putting some serious effort into image optimization: might save me more traffic than CF caching ,:wink:

Maybe you can look Into what Pictures are requested “often” and only prewarming them.

I would use both. Image Optimization and Cloudflare Caching ^^. After all, 10% is not much but at least it means that for 10% of the users the page loads faster thanks to cache. 10% less traffic on your server is 10% less traffic ^^

1 Like

Here’s the top of my traffic geography for the last month:
|Russian Federation|211,335|
|United States|108,863|
There’s also Argentina not too far down. Doesn’t look good for efficient caching with my “average 2.5 times a month”, does it?

I guess its not really much that you can cache. You could use Argos Tiered Caching but these would cost extra. I for myself would try to optimize the Images but still would use Cloudflare in Front. 10% Cache is better that nothing and Cloudflare Protects your Website against Attacks as well

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.