Why 'cf-cache-status' is different ('hit' or 'missing') depending on the tool I use to check it


I’m getting familiar with CloudFlare cache, and I’m testing a directory of my website (* myserver.com/dir/*) with a Page Rule with the following settings:

  • Browser Cache TTL: a day
  • Always Online: On
  • Cache Level: Cache Everything
  • Edge Cache TTL: a month

My aim is to cache completely the webpages, in order to save bandwith and resources in the origin server.

I started to check the cache headers of a certain URL (‘https://myserver.com/dir/foo.html’) with different tools:

However, each time I use these different tools, I must check them twice in order to obtain cf-cache-status=HIT.

I supposed that the first time I visited the URL (for instance, with ‘curl’), CloudFlare would cache my webpage. But I have to use twice each tool to obtain the cache. I’m not sure if this depends on the geographical region where the tool is located.

What am I missing? Thank you.

Each of the 3 tools connects to a different Cloudflare data center. Your page is cached in some of them but not all. Also collect the cf-ray header to record the name of the data center. The last 3 letters in the header correspond to the nearest airport.

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