Skip to content

Commit 2e6a11f

Browse files
Changelog: Inspect Cache Keys with Cloudflare Trace (#27001)
* Changelog: Inspect Cache Keys with Cloudflare Trace * Update src/content/changelog/cache/2025-11-07-cache-keys-for-cloudflare-trace.mdx * Apply suggestions from code review --------- Co-authored-by: angelampcosta <[email protected]>
1 parent f541a59 commit 2e6a11f

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: Inspect Cache Keys with Cloudflare Trace
3+
description: View the specific cache key generated for requests to troubleshoot caching behavior and rules configuration.
4+
products:
5+
- cache
6+
date: 2025-11-07
7+
---
8+
9+
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.
10+
11+
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.
12+
13+
Access Trace via the [dashboard](/rules/trace-request/how-to/#use-trace-in-the-dashboard) or [API](/api/resources/request_tracer/methods/trace/), either manually for ad-hoc debugging or automated as part of your quality-of-service monitoring.
14+
15+
## Example scenario
16+
17+
If you have a Cache Rule that segments content based on a specific cookie (for example, `user_region`), run a Trace with that cookie present to confirm the `user_region` value appears in the resulting cache key.
18+
19+
The Trace response includes the cache key in the `cache` object:
20+
21+
```json
22+
{
23+
"step_name": "request",
24+
"type": "cache",
25+
"matched": true,
26+
"public_name": "Cache Parameters",
27+
"cache": {
28+
"key": {
29+
"zone_id": "023e105f4ecef8ad9ca31a8372d0c353",
30+
"scheme": "https",
31+
"host": "example.com",
32+
"uri": "/images/hero.jpg"
33+
},
34+
"key_string": "023e105f4ecef8ad9ca31a8372d0c353::::https://example.com/images/hero.jpg:::::"
35+
}
36+
}
37+
```
38+
39+
## Get started
40+
41+
To learn more, refer to the [Trace documentation](/rules/trace-request/) and our guide on [Custom Cache Keys](/cache/how-to/cache-keys/).

0 commit comments

Comments
 (0)