Learn how to use Cache Analytics to identify improvements to site performance or reduce traffic sent to your origin web server.
Overview
Explore your cache usage with Cache Analytics. Cache Analytics is available for customers on Pro, Business, and Enterprise plans.
Use Cache Analytics to improve site performance or reduce origin web server traffic. Cache Analytics helps determine if resources are missing from cache, expired, or ineligible for caching. Cache Analytics includes filter by hostnames, list of top URLs that miss cache, and query of up to three days of data.
First, at the top-left, you should decide if you want to focus on Requests or Data Transfer. Requests is the default view. Requests helps understand performance, because every cache miss degrades the speed of content delivery. Data Transfer helps understand cost, because most hosting providers charge for every byte that leaves their network.
You can toggle between Requests and Data Transfer while keeping other analytics filters enabled.
Add filters
Cache Analytics also allows for flexible filtering of data. Create filters to focus on the traffic to optimize. Example filters include Cache status, Host, Path, or Content type.
To add filters, click Add filter under Cache Performance. Then, click Apply after adding the filter.
Review cache status
The Requests summary graph depicts how your traffic changes over time such as in response to a high-traffic event or a recent configuration change.
Served by Cloudflare indicates content served by Cloudflare that didn’t require contacting your origin web server. Served by Origin indicates traffic served from the origin web server.
For Data Transfer, Revalidated requests are considered Served by Cloudflare. However, Revalidated requests count as Served by Origin within the Requests view. This analytics behavior reflects that Cloudflare must check the origin web server for revalidated cache requests before returning a result from cache.
Cache status graphs help explain why traffic is served from Cloudflare versus the origin web server. The graph shows analytics by content-type to portray how different components of your website perform:
Cache statuses are also essential for understanding what you need to do to optimize cache ratios. For example:
- Dynamic indicates a request ineligible for cache that was served by the origin web server. This is the default for many file types, including HTML. Learn how to cache additional content using Cloudflare Page Rules.
- Revalidated indicates expired content is still found fresh after Cloudflare checked the origin web server. To address an abnormal quantity of revalidated content, consider increasing your Edge Cache TTLs via a Page Rule or max-age origin directive.
- Expired resources were present in cache, but expired. Consider extending Edge Cache TTLs for these resources via a Page Rule, or enable revalidation at your origin.
- None indicates requests generated by Cloudflare and not served by Cloudflare's edge or the origin web server, including requests blocked by the firewall, redirects in page rule, responses generated entirely in Workers with no fetch(), etc.
- Miss indicates that Cloudflare has not recently observed that resource. 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 (e.g. by ignoring query string).
For additional cache status details, visit our help center.
Review requests by source
Cache Analytics shows top metrics (Top-N) for several request components:
It’s helpful to apply filters, such as to a specific Cache status, before reviewing Top-N metrics. For example, filtering to only traffic with an Expired or Revalidated Cache status allows review of which URLs were primarily responsible for those statuses.
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 Identify the issue: click 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: click Add filter and select Cache status equals Miss. Resolution: Enable Argo Tiered Caching or create a custom cache key.
Related resources