Cf-cache-status: MISS - always when I check it any next time from same device same location

Hi,

Sometimes I just do sanity checks to see if Cloudflare returns cached content, and when I do these sanity checks, it’s always a MISS and I don’t understand why. And CF statistics proves the fact:

LAST WEEK

total requests in : 4180
cached: 114
uncached: 4066

I cache all static resources, images, CSS, JS, etc.

So I do sanity checks on images.

My TTL is set to 2764800 (32 days)

Here’s my assumption:

If I open my website from the same location within the 32 days after it has been cached by Cloudflare CDN, then I should get cached data every day until 32 days expire. Right?

It does not work as I described. It’s [almost?] always a MISS. If I do CTRL+F5 and start refreshing after that, I get a HIT. All seems to work fine, not that I never see a “HIT”. But when I check it the next day, or the day after that, it’s again a MISS. As if something else is taken into account aside from TTL and location

What else is taken into account? I suspect that some hash or some other value changes somewhere which makes the cached data obsolete and it refetches again. At this point I almost don’t see the point in Cloudflare. Please help figure this out.

Test URL: https://www.musicianposter.com/catalog

Here’s the response for 1 image:

Request URL: https://www.musicianposter.com/image/product/c1680-thrymode3ntemajr/preview/1/jpg/music-poster-3-note-chords-diagram-in-roman-numeral-system-for-all-modes-of-the-major-scale-plus-a-tool-for-modal-interchange-1.jpg?v=547eb78619ee4fc76c7483c576879748
Request Method: GET
Status Code: 200 
Remote Address: 172.67.209.95:443
Referrer Policy: strict-origin-when-cross-origin
cache-control: max-age=2764800
cf-cache-status: MISS
cf-ray: 622e5bdfa8c91d02-CPH
cf-request-id: 0850d7bfc600001d02842d7000000001
content-type: image/jpeg;charset=utf-8
date: Wed, 17 Feb 2021 09:07:35 GMT
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
nel: {"report_to":"cf-nel","max_age":604800}
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=hVDLjzxecyEoOo3JfLj3%2B9oA9yoQRft9DllDrgO8AUv3klz7kQiOdrk03mZaQzrcdJQPogIsxyvsCEBVRzQm8G%2FUs7iRaFbiva3%2FdiV3WbYJXNeFUjxe"}],"group":"cf-nel","max_age":604800}
server: cloudflare
strict-transport-security: max-age=31536000 ; includeSubDomains
vary: Accept-Encoding
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
:authority: www.musicianposter.com
:method: GET
:path: /image/product/c1680-thrymode3ntemajr/preview/1/jpg/music-poster-3-note-chords-diagram-in-roman-numeral-system-for-all-modes-of-the-major-scale-plus-a-tool-for-modal-interchange-1.jpg?v=547eb78619ee4fc76c7483c576879748
:scheme: https
accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9
cookie: __cfduid=d13a5245cc1959a110662523c48c4456f1612905162; _ga=GA1.1.1608325915.1612905544; JSESSIONID=node0jwh8qin4olj2dx6zmc1odey42157.node0; _ga_0BXV21LVMB=GS1.1.1613552876.3.1.1613552883.0
referer: https://www.musicianposter.com/catalog
sec-fetch-dest: image
sec-fetch-mode: no-cors
sec-fetch-site: same-origin
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36
v: 547eb78619ee4fc76c7483c576879748

Not likely. That TTL is the maximum amount of time you would like that resource to stay in cache. Cloudflare evicts rarely-used resources early to make room for high traffic URLs. It’s a very fluid algorithm for what’s moved into cache, and for how long.

Thanks for the reply. So what are you saying, that’s a normal behavior? The site is new and traffic is low. Is that because the resource is getting requested rarely? Then am I right to assume that the algorithm evicts the value from cache if it has not been requested for 24 hours or so? Can I see the exact algorithm described somewhere?

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