Default Cache Behavior
Cloudflare respects the origin web server’s cache headers in the following order unless an Edge Cache TTL cache rule overrides the headers.
- Cloudflare does not cache the resource when:
- Cloudflare does cache the resource when:
Cache-Controlheader is set to
max-ageis greater than 0.
Expiresheader is set to a future date.
Default cached file extensions
Cloudflare only caches based on file extension and not by MIME type. The Cloudflare CDN does not cache HTML by default. Additionally, Cloudflare caches a website’s robots.txt.
Customization options and limits
Cloudflare’s CDN provides several cache customization options:
- Caching behavior for individual URLs via
- Customize caching with
- Adjust caching level, cache TTL, and more via the Cloudflare Caching app
Max upload size
|100 MB||100 MB||200 MB||500+ MB|
Cacheable size limits
Cloudflare cacheable file limits:
- Free, Pro and Business customers have a limit of 512 MB.
- For Enterprise customers the default maximum cacheable file size is 5 GB. Contact your account team to request a limit increase.
Cloudflare cache responses
The output of the
CF-Cache-Status header shows whether or not a resource is cached. To investigate cache responses returned by the
CF-Cache-Status header, use services like , , or a visual tool like .
|HIT||The resource was found in Cloudflare’s cache.|
|MISS||The resource was not found in Cloudflare’s cache and was served from the origin web server.|
|NONE/UNKNOWN||Cloudflare generated a response that denotes the asset is not eligible for caching. This may have happened because:||EXPIRED||The resource was found in Cloudflare’s cache but was expired and served from the origin web
server.||STALE||The resource was served from Cloudflare’s cache but was expired. Cloudflare could not
contact the origin to retrieve an updated resource.||BYPASS||The origin server instructed Cloudflare to bypass cache via a Cache-Control header set to ||REVALIDATED||The resource is served from Cloudflare’s cache but is stale. The resource was revalidated by
either an ||UPDATING||The resource was served from Cloudflare’s cache and was expired, but the origin web server
is updating the resource. UPDATING is typically only seen for very popular cached resources.||DYNAMIC||Cloudflare does not consider the asset eligible to cache and your Cloudflare settings do not
explicitly instruct Cloudflare to cache the asset. Instead, the asset was requested from the
origin web server. Use Cache Rules to implement
custom caching options.|