Skip to content
AnswerWell geo Documentation

Research · 9 min read · Answerwell

Edge Cache Analytics, Trace Inspection, and Performance Troubleshooting

How to use CDN cache analytics and request trace to find misses, verify cache keys, and fix Dynamic, Revalidated, and Miss cache statuses.

This page summarizes Cloudflare documentation on Cache Analytics, cache performance workflows, and Cloudflare Trace—the dashboard and API tool that simulates an HTTP/S request so you can see cache status, cache keys, and which rules fired. Use it when hit ratio is low, HTML stays DYNAMIC, or you need to confirm a Cache Rule or custom cache key before changing production settings.

Cache Analytics: how much traffic is served from cache

Section titled “Cache Analytics: how much traffic is served from cache”

Cache Analytics shows how much of your site’s traffic is served from Cloudflare’s cache versus your origin server. When content is served from cache, visitors get faster page loads and your origin web server handles less traffic.

Cache Analytics shows how much of your site’s traffic is served from Cloudflare’s cache versus your origin server. When content is served from cache, visitors get faster page loads and your origin web server handles less traffic. Use Cache Analytics to identify resources that are missing from cache, expired (cached copy is outdated), or ineligible for caching (not eligible for caching). You can filter by hostname, review the top URLs that miss cache, and query up to three days of data.

— Cloudflare, Cache Analytics

The same product family is described under performance review and surge readiness caching: analytics help you decide whether resources are missing from cache, expired, or ineligible for caching.

Requests vs Data Transfer: performance view or cost view

Section titled “Requests vs Data Transfer: performance view or cost view”

You can decide whether to focus on Requests or Data Transfer:

View Best for Why it matters
Requests (default) Performance Each cache MISS means the request must go to your origin instead of being served from Cloudflare’s cache, which adds latency.
Data Transfer Cost analysis Most hosting providers charge for data sent from their servers (egress bandwidth).

You can switch between these views while keeping other analytics filters applied. For worked examples tied to filters, see Cache performance.

Add filters: narrow traffic by cache status, host, or path

Section titled “Add filters: narrow traffic by cache status, host, or path”

Create filters to narrow the data to specific traffic segments. Example filters include Cache status, Host, Path, or Content type.

To add filters, under Cache Performance, select Add filter. Select Apply when you are done.

Cache Analytics also shows the most frequent values (top N) for several request attributes. Apply filters before reviewing these metrics— for example, filtering to only view traffic with an Expired or Revalidated cache status shows which URLs were primarily responsible for those statuses.

Cache performance: fix common Cache Analytics patterns

Section titled “Cache performance: fix common Cache Analytics patterns”

Use Cache Analytics to identify cache performance issues. Cloudflare documents three recurring filter-and-fix patterns on Cache performance.

Not caching HTML (Cache status equals Dynamic)

Section titled “Not caching HTML (Cache status equals Dynamic)”

Identify the issue: Select Add filter and select Cache status equals Dynamic.

Resolution: Set a Cloudflare Cache Rule to cache dynamic content.

Short cache expiration TTL (Cache status equals Revalidated)

Section titled “Short cache expiration TTL (Cache status equals Revalidated)”

Identify the issue: Select Add filter and select Cache status equals Revalidated.

Resolution: Increase Cloudflare’s Edge Cache TTL via a Cache Rule.

Need Tiered Cache or a custom cache key (Cache status equals Miss)

Section titled “Need Tiered Cache or a custom cache key (Cache status equals Miss)”

Identify the issue: Select Add filter and select Cache status equals Miss.

Resolution: Enable Tiered Cache or create a custom cache key (see Cache keys).

Integrations such as New Relic expose metrics like total requests, cached versus origin requests for ongoing monitoring. For log-based ratios, parsing Logpush JSON shows counting CacheCacheStatus values with tools like jq.

Cloudflare Trace: simulate a request and see cache behavior

Section titled “Cloudflare Trace: simulate a request and see cache behavior”

Cloudflare Trace (Beta) simulates an HTTP/S request through Cloudflare’s network to your origin server. Use this tool to understand how your Cloudflare configurations (such as rules, caching, and security settings) would affect a specific request. If the hostname you are testing is not proxied by Cloudflare, Cloudflare Trace will still return all the configurations that Cloudflare would have applied to the request.

Available on all plans … Cloudflare Trace is available to users with an Administrator or Super Administrator role.

— Cloudflare, Trace a request

You can define specific request properties to simulate different conditions. Rules that are turned off in Cloudflare products will not be evaluated.

Tool Question it answers
Cloudflare Trace What would happen on a simulated request—rule order, cache outcome, rewrites—before or after a config change.
Log Explorer What did happen on real production traffic over time.

Use Trace when you need to test what would happen with a simulated request: … Understanding why a rule did not trigger as expected … Seeing the evaluation order of your rules … The key difference is that Trace simulates “what-if” scenarios, while Log Explorer shows actual historical traffic.

— Cloudflare, Trace a request

Log Explorer example queries include summarizing CDN traffic by CacheCacheStatus with average time to first byte—useful when analytics dashboards are not enough for historical drill-down.

  1. In the Cloudflare dashboard, go to the Trace page (linked from Use Cloudflare Trace).

  2. Enter a URL to trace. The URL must include a hostname that belongs to your account. Select an HTTP method; for POST, PUT, or PATCH, enter a Request Body if needed.

  3. Optionally set Protocol, User Agent, Request Headers, Cookies, Geolocation, Bot Score, or Skip Challenge to match the scenario you are debugging.

  4. Select Send Trace. On the results page, review evaluated configurations in order. To show rules that did not match, select All configurations in the Results shown dropdown.

  5. To repeat the same setup, copy the trace JSON from the dashboard and paste it when starting a new trace, or use the Request Trace API operation described in the same guide.

When cache rules seem wrong in production, slow website troubleshooting recommends Trace when a cache rule should cache content but the response shows DYNAMIC or BYPASS, when rule precedence is unclear, or when you want a what-if test before changing settings.

Inspect cache keys and cache hits in Trace

Section titled “Inspect cache keys and cache hits in Trace”

You can use Cloudflare Trace to find which Cache Key settings were applied to your request. When you send a request through the Trace tool, if the request was served from cache, it will show a cache hit in the Cache Parameters section. Then select View parameter detail to see exactly which Cache Key properties were used.

You can now see the exact cache key generated for any request directly in Cloudflare Trace. This visibility helps you troubleshoot cache hits and misses, and verify that your Custom Cache Keys — configured via Cache Rules or Page Rules — are working as intended.

— Cloudflare, Inspect Cache Keys with Cloudflare Trace

Previously, diagnosing caching behavior required inferring the key from configuration settings. Now, you can confirm that your custom logic for headers, query strings, and device types is correctly applied. Access Trace via the dashboard or API for ad-hoc debugging or automated quality-of-service checks.

Example: If you have a Cache Rule that segments content based on a cookie such as user_region, run a Trace with that cookie present to confirm the user_region value appears in the resulting cache key. The Trace response includes a cache object with key and key_string fields (see the JSON example on the changelog post).

The same Trace workflow applies when troubleshooting Cache Rules, Cache Response Rules, Compression Rules, Configuration Rules, Origin Rules, Transform Rules, and URL forwarding—each doc points to Trace to see whether a rule triggers for a specific URL.

For rule-order questions (for example, a URL rewrite before WAF evaluation), phase interactions recommends Trace to check evaluation order against an example request.

Cloudflare Traces: capture real production requests

Section titled “Cloudflare Traces: capture real production requests”

Cloudflare Traces (under Observability) are separate from request simulation: they show how production requests move through Cloudflare, with spans for Rules, routing, Cache, Workers, and origin connections.

Use Cloudflare Traces to answer questions such as: … Was the response served from cache, and where was time spent between Cloudflare, the origin connection, and the application?

— Cloudflare, Traces

Filter by Ray ID in the dashboard with cloudflare.ray_id = "<ray>". To guarantee a particular request is captured regardless of the default sample rate, create a trace rule that matches a custom debug header and sets the sample rate to 100%.

Trace rules override the default sample rate for matching requests. Cloudflare uses the first matching rule, so rule order matters. Set Sample rate (%) to the percentage of matching requests you want to trace, then Deploy or Save as Draft to keep the rule inactive.

A Cloudflare Ray ID is added on connections as the cf-ray header and can be read in browser developer tools or with curl -v. Ray IDs are not guaranteed to be unique for every request (Ray ID reference).

Trace does not display rules that are automatically bypassed for operational reasons—for example, when SSL/TLS certificates are in pending_validation status, security rules may be disabled for DCV paths such as /.well-known/pki-validation/ and /.well-known/acme-challenge/, and those bypasses will not appear in trace results.

Trace currently does not support hostnames using Data Localization Suite or Spectrum applications. Several older or separate products also will not appear in trace results, including deprecated firewall rules, Load Balancing and Load Balancer Custom Rules, IP Access rules, previous-version rate limiting and WAF managed rules, and content security rules. Full lists are on Cloudflare Trace limitations.

Trace has expanded over time to include Workers, BYOIP zones, and grey-clouded hostnames (Trace changelog).

  • Treating Trace as live traffic. Trace is simulation; use Log Explorer or Cloudflare Traces for what actually happened.
  • Caching all HTML after a Dynamic filter without excluding cookies or dynamic paths—risk of serving the wrong content to visitors (Cache performance).
  • Debugging cache keys from config alone instead of using View parameter detail or the published key_string in Trace (Cache keys, changelog).
  • Expecting every security product in Trace results while using unsupported or deprecated rule types (limitations).
  • Using only the Requests view when the problem is egress cost—switch to Data Transfer in Cache Analytics.
  1. Open Cache Analytics for your zone, note the default Requests view, and add a Cache status filter for Miss, Dynamic, or Revalidated depending on the symptom described in Cache performance.

  2. For a specific URL, run Cloudflare Trace with the same method, headers, and cookies as the failing client; confirm cache status and open Cache Parameters → View parameter detail for cache key fields.

  3. If a custom cache key or cookie segmentation is involved, compare the Trace key_string to your Cache Rules and Cache keys settings using the workflow in Inspect Cache Keys with Cloudflare Trace.

  4. For production-only behavior, capture a Ray ID from response headers and filter Cloudflare Traces by cloudflare.ray_id, or add a 100% trace rule for a debug header (Traces).

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about, and we will correct or clarify it.