Cf-cache-status HIT for request reaching our servers

Hi,

Setup / caching rules:
We had the domain cache rule set to “ignore query string” and a Page Rule set to “https://domain.com/”.

Two questions:

  1. Can you confirm that the Page Rule overrides the domain rule in this scenario?
  2. Can you explain why I was getting responses with cf-cache-status HIT for requests that hit our back servers? It looks as though there was an incoherence and that the cf-cache-status should have been set to MISS if the requests hit our own back servers.

Thanks,
Laura.

Maybe there’s a cache-control header on your webserver?

Try adding a page rule (make sure this is the only one and it doesn’t conflict with others) and set domain.com/* Cache-Level: Bypass

That should work. Give it some time to update. Try going to a different url on your server and see if it caches. Cloudflare caches for quite some time, especially if it’s a free account. It probably isn’t purging the cache on update.

If anything, you can consider purging everything:
image
(Purging cached resources from Cloudflare – Cloudflare Help Center)

Hi,

We do not set a cache-control header on our webservers. I assume your suggestion of trying the BYPASS Page Rule was for that, right?

I guess we just noticed a constant increase of requests on our backend servers since we added that Page Rule domain.com/* with cache everything.

Can you confirm that a Page Rule cache everything overrides the domain cache rule “Ignore Query Strings” and that now we cache not ignoring query strings?

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