Cloudflare Docs
Cache
Visit Cache on GitHub
Set theme to dark (⇧+D)

Cache performance

Optimize cache ratios

Depending on the cache status you receive, you can make modifications to improve your cache ratio. To review the list of cache statuses, refer to Cloudflare cache responses .

Example reports for troubleshooting cache performance

Several examples of helpful insights into your site performance via Cache Analytics include:

  • Not caching HTML.

    • Identify the issue: Click Add filter and select Cache status equals Dynamic.
    • Resolution: Set a Cloudflare Page Rule to cache dynamic content .
  • Short cache expiration TTL.

  • Need to enable Tiered Cache or Custom Cache Key

    • Identify the issue: Click Add filter and select Cache status equals Miss.
    • Resolution: Enable Argo Tiered Caching or create a custom cache key .
  • Interaction of HEAD requests with Cache

    • Cloudflare converts HEAD requests to GET requests for cacheable requests.
    • When you make a HEAD request for a cacheable resource and Cloudflare does not have that resource in the edge cache, a cache miss happens. Cloudflare will send a GET request to your origin, cache the full response and return the response headers only. Make sure the origin server is setup to handle GET requests, even if only HEAD requests are expected, so that compatibility with this behavior is ensured.