Skip to content

Cache performance

Optimize cache ratios

Your cache ratio measures how often Cloudflare serves content from cache instead of contacting your origin server. A higher ratio means faster responses for visitors and less traffic to your origin.

Depending on the cache status you receive, you can make modifications to improve your cache ratio.

  • Dynamic: The resource was not eligible for caching. This is the default response for many file types including HTML. To cache additional content, refer to Cache Rules.
  • Revalidated: The resource was in cache but Cloudflare confirmed with your origin that it was still current before serving it. To address an atypical quantity of revalidated content, consider increasing your Edge Cache TTLs (how long Cloudflare considers cached content fresh before checking your origin).
  • Expired: The cached resource's TTL elapsed before it was requested again. Consider extending Edge Cache TTLs for these resources via a Cache Rule, or configure your origin to return revalidation headers (Last-Modified or ETag) so Cloudflare can confirm content is still current without downloading it again.
  • Miss: The resource was not found in cache and was served from your origin. Although tricky to optimize, there are a few potential remedies:
    • Enable Tiered Cache to check an upper-tier Cloudflare data center before contacting your origin server.
    • Create a custom cache key so that multiple URLs match the same cached resource, for example by ignoring the query string.

Troubleshoot cache performance with example reports

Use Cache Analytics to identify cache performance issues. The following examples show how to filter for common problems and resolve them.

  • Not caching HTML.

    • Identify the issue: Select Add filter and select Cache status equals Dynamic.
    • Resolution: Set a Cloudflare Cache Rule to cache dynamic content.