What do the various Cloudflare cache responses (HIT, Expired, etc.) mean?

It is possible to check if Cloudflare is caching my site or a specific file by checking the responses shown in the "CF-Cache-Status" header, this article explains what these responses may be. 

Note: Cloudflare's static content caching is dependent on both (a) where most of your visitors are coming from and which Cloudflare datacenter they are hitting, and (b) how may times those resources are requested at the specific datacenter. As such, Cloudflare does not cache the same resources for your site globally at every datacenter location.

HIT: resource in cache, served from CDN cache

MISS: resource not in cache, served from origin server

EXPIRED: resource was in cache but has since expired, served from origin server

STALE: resource is in cache but is expired, served from CDN cache because we tried to contact the origin but experienced an error.

BYPASS: the origin server instructs the CDN to always bypass cache (that is, the origin sets the header Cache-Control: no cache)

IGNORED: resource is cacheable but not in cache because it hasn't met the threshold (number of requests, usually 3), served from origin server. Will become a HIT once it passes the threshold.

REVALIDATED: REVALIDATED means we had a stale representation of the object in our cache, but we revalidated it by checking using either an If-Modified-Since header or an If-None-Match header.

UPDATING: A status of UPDATING indicates that the cache is currently populating for that resource and the response was served stale from the existing cached item. This status is typically only seen when large and/or very popular resources are being added to the cache.

What if there no "CF-Cache-Status" header?

If the "CF-Cache-Status" header is missing (but you are seeing other Cloudflare headers such as "CF-RAY"), this can indicate that the resource is not something we would ordinarily cache. There is a list of file extensions we cache by default and you can utilise Page Rules to implement custom caching options (including static content and HTML).


-Cloudflare will not cache your site or static content if you have  no-cache and private headers coming from your server. If you want Cloudflare to cache content on your site, please make sure that the headers are changed to allow caching. If you don't know what your headers are returning, please use a service like Redbot to check.

-Cloudflare does not cache off-site or third-party resources (widgets, etc.).

-Cloudflare will only proxy and cache records where Cloudflare is proxying that record in your DNS settings.

-You can adjust your caching level and cache TTL in your Cloudflare caching settings under the section 'Speed'.

Not finding what you need?

95% of questions can be answered using the search tool. This is the quickest way to get a response.

Powered by Zendesk