Cache Headers
free/v1/domain/cacheAnalyzes HTTP caching headers to understand how content is cached by browsers and CDNs. Evaluates Cache-Control, ETag, Last-Modified, Vary, and Pragma headers. Detects CDN providers (Cloudflare, Fastly, CloudFront, Vercel, Akamai, Netlify) and reports cache status. Identifies conflicts, security issues, and optimization opportunities.
What It Does
Examines all cache-related HTTP headers and parses Cache-Control directives (max-age, s-maxage, no-cache, no-store, private, public, immutable, stale-while-revalidate, stale-if-error). Detects CDN providers and their cache hit/miss status. Identifies contradictory directives, security risks like Set-Cookie on public responses, and provides a human-readable summary of the caching behavior.
Why It's Useful
Proper caching reduces server load, improves performance, and saves bandwidth. Analyzing cache headers helps identify misconfiguration, contradictory directives, and security issues like sensitive data being cached by shared proxies.
Use Cases
Performance Debugging
Debug why content isn't being cached properly by analyzing cache header configuration.
Fix caching issues improving repeat visit performance.
CDN Optimization
Verify cache headers are set correctly for CDN edge caching.
Maximize CDN cache hit rates for better performance and lower origin load.
Security Review
Ensure sensitive pages have proper no-cache/no-store headers.
Prevent sensitive data from being cached inappropriately.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Required | The domain to analyze cache headers forExample: example.com |
Response Fields
| Field | Type | Description |
|---|---|---|
domain | string | The queried domain |
statusCode | number | HTTP status code of the response |
contentType | string | Content-Type of the response |
isCacheable | boolean | Whether the response is cacheable |
summary | string | Human-readable summary of the caching behavior |
cacheControl | object | Parsed Cache-Control directives (public, private, noCache, noStore, maxAge, sMaxAge, mustRevalidate, proxyRevalidate, noTransform, immutable, staleWhileRevalidate, staleIfError) |
etag | string | ETag header value |
lastModified | string | Last-Modified header value |
vary | array | Vary header values |
expires | string | Expires header value |
age | number | Age header value in seconds |
pragma | string | Pragma header value (legacy HTTP/1.0) |
effectiveTtl | number | Effective TTL in seconds (priority: s-maxage > max-age > expires) |
ttlFormatted | string | Human-readable TTL duration |
cdn | object | CDN detection result (detected, provider, cacheStatus, edgeLocation) |
issues | array | Caching issues and conflicts detected |
recommendations | array | Caching optimization and security suggestions |
Code Examples
curl "https://api.edgedns.dev/v1/domain/cache" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d "domain=example.com"const response = await fetch(
'https://api.edgedns.dev/v1/domain/cache?domain=example.com',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);import requests
response = requests.get(
'https://api.edgedns.dev/v1/domain/cache',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'domain': 'example.com'
}
)
data = response.json()
print(data)Read the full Cache Headers guide
Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.
Read the guide →Related Endpoints
External References
Learn more about the standards and protocols behind this endpoint.
Try This Endpoint
Test the Cache Headers endpoint live in the playground.