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.
- Dynamic: Default response for many file types including HTML. To cache additional content, refer to custom caching with page rules.
- Revalidated: To address an atypical quantity of revalidated content, consider increasing your Edge Cache TTLs via a Page Rule or max-age origin directive.
- Expired: Consider extending Edge Cache TTLs for these resources via a Page Rule or enable revalidation at your origin.
- Miss: Although tricky to optimize, there are a few potential remedies:
- Enable Argo Tiered Caching to check cache in another Cloudflare data center before checking the origin web server.
- Create a custom cache key for multiple URLs to match the same cached resource, for example by ignoring query string.
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: Select Add filter and select Cache status equals Dynamic.
- Resolution: Set a Cloudflare Page Rule to cache dynamic content.
-
Short cache expiration TTL.
- Identify the issue: Select Add filter and select Cache status equals Revalidated.
- Resolution: Increase Cloudflare’s Edge Cache TTL via a Page Rule.
-
Need to enable Tiered Cache or Custom Cache Key
- Identify the issue: Select Add filter and select Cache status equals Miss.
- Resolution: Enable Argo Tiered Caching or create a custom cache key.