Cache everything is caching some but not the really obvious and suitable files

Hi, it’s really odd as the cache is working for my site in some instances, but not in the most obvious. Static images on every page of the whole site, for example. The logo of the site is a good example. It never changes and is always on every single page of the website. It won’t cache, but an image i use on a navigation menu that only appears on certain pages, is cached fine.

pages rules i’m using

www.myDomainName.co.uk/*
Browser Cache TTL: 16 days, Cache Level: Cache Everything, Edge Cache TTL: 14 days

Dr Flare (awesome BTW) shows 14 objects cached, 31 uncached, 45 Proxied.

Is there anyway i can say to Cloudflare, please cache this specific file or set of files until i change my mind?

many thanks

1 Like

Via page rules, but you still cant cache indefinitely.

Whats the URL?

1 Like

thanks

The logo for example is being cached

image

How long, depends on your settings in the page rule.

1 Like


shows logo file is not cached

sorry came through at the same time - In UK it’s not being cached - where are you?

Might have been the first access. Reload the page and the image should come from the cache.

thanks but i’ve been monitoring it for weeks now and never seen the logo file cached or most of the other files that you would expect to be. site furniture etc… not being cached

Open the developer tools in your browser (F12), reload the page, select the logo link under the network tab, and make a screenshot of it and post it here.

I am pretty sure the image will be cached on a subsequent request.

okay that’s odd - the uncached objects have changed to only 8 now - from 31 a few mins ago.

thanks

that’s so much better!

1062 http/2.0 GET https://www.londonorthotics.co.uk/media/137308/plagio-brachy-smaller2.jpg 200 53ef26ce4c2f34f8 126ms private, max-age=1382400 104.27.131.98 76995 image/jpeg miss LHR
1063 http/2.0 GET https://www.londonorthotics.co.uk/media/137311/pectus-carousel.jpg 200 53ef26ce4c3034f8 133ms private, max-age=1382400 104.27.131.98 73454 image/jpeg miss LHR
1064 http/2.0 GET https://www.londonorthotics.co.uk/media/137292/casting-shot.jpg 200 53ef26ce4c2d34f8 156ms private, max-age=1382400 104.27.131.98 101172 image/jpeg miss LHR
1065 http/2.0 GET https://www.londonorthotics.co.uk/media/137306/manufacturing.jpg 200 53ef26ce4c2e34f8 142ms private, max-age=1382400 104.27.131.98 89872 image/jpeg miss LHR
1066 http/2.0 GET https://www.londonorthotics.co.uk/media/120530/footscan_carhero.jpg 200 53ef26ce4c3234f8 168ms private, max-age=1382400 104.27.131.98 57642 image/jpeg miss LHR
1067 http/2.0 GET https://www.londonorthotics.co.uk/media/129977/j_edit_before-after-4-weeks.jpg 200 53ef26ce4c3134f8 115ms private, max-age=1382400 104.27.131.98 292289 image/jpeg miss LHR
1068 http/2.0 GET https://www.londonorthotics.co.uk/media/137267/loc-1777-orthotics.jpg 200 53ef26cf1c9534f8 110ms private, max-age=1382400 104.27.131.98 56461 image/jpeg miss LHR
1069 http/2.0 GET https://www.londonorthotics.co.uk/media/137939/london-orthotics-mark-kernot.jpg 200 53ef26cf1c9334f8 140ms private, max-age=1382400 104.27.131.98 202955 image/jpeg miss LHR

Your caching TTL is pretty high, but there is no guarantee Cloudflare will actually honour that. Especially rarely requested files might get purged earlier. But as long as it shows a HIT upon the second or third request you should be fine.

thanks for the advice - what would you recommend as the max cache TTL
:smiley:

No recommendation from my side. I, personally, use the default settings (I believe they are four hours). It really comes down to to whether how much of an issue you have with Cloudflare requesting your files anew after X hours.

thanks for your time.

1 Like

Hello again - sorry to say that the CF cache has returned to the normal behavior where all the main static assets such as logo etc… are not cached by CF.

Any idea why this is the case and is still the case?

many thanks
Ed.

Most likely a response header your server is sending. Either cache control or you are including a cookie, which typically prevents Cloudflare from caching as well.

Which changes have you made recently?

hi and thanks - not aware of any changes other than reducing the Browser Cache Expiration to 8 days in the CF portal (it was higher). not aware of any cookies either and this was working previously so i don;t thing a cookie could be it.

I did enable dynamic content compression in IIS but can’t see how that’s related as the items not caching are static images and not text.

for example

i get cf-cache-status: BYPASS

Try to undo whatever you changed step by step and check if it starts caching again.

I did notice that.