Low caching from Cloudflare

Hi everyone,

I’ve just enabled Cloudflare for my domain and looking at the cache vs uncached usage under Analytics > Web Traffic, I’m getting incredibly low cache rates 215k Uncached vs 756 Cached.

The main site is https://web-push-book.gauntface.com/ and this is an example set of response headers for the HTML page:

alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
cache-control: 'max-age=86400'
cf-cache-status: DYNAMIC
cf-ray: 5d23b3b8fa94090d-SEA
cf-request-id: 052a2ea79d0000090decb2a200000001
content-encoding: br
content-type: text/html
date: Sun, 13 Sep 2020 17:48:57 GMT
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
last-modified: Sun, 13 Sep 2020 17:31:38 GMT
server: cloudflare
status: 200

I’d love any advice or input on how to improve the caching / make it more reliable.

Thanks,
Matt

HTML is not cached by Cloudflare. If you want that you’ll need a page rule.

Your JavaScript files, for example, are cached however

image

1 Like

Thank you so much!

Just followed the steps on this support page and got a HIT for the HTML page.

Yes, HTML is cached now as well. Keep in mind any changes on your site will only be reflected after you clear the cache. Just one thing to remember.

So will this not follow the max-age header and cache for the defined period? Which in my case should be a day?

after you clear the cache or the resource expires

I meant to say :slight_smile:

4 Likes

Thank you again for your help and follow up!

My content is not that important or updated that frequently, so 24 hours is just fine for me :slight_smile:

Then you are good to go :slight_smile: