Cache Control Overview
Analyze cache-related headers across layers. No input is sent to a server. Use it for first-pass revalidation and CDN mismatch troubleshooting.
Status
Runs in your browser. No input is sent to a server. Use this as a first-pass diagnostic step.
How to use
Anchor on Cache-Control and place Pragma/Expires/Age around it.
Roles
- Cache-Control: primary relative freshness and controls
- Pragma: legacy for HTTP/1.0 (mainly no-cache)
- Expires: absolute expiry time
- Age: seconds stored by intermediaries
Precedence
- Cache-Control has highest priority
- Pragma is for legacy compatibility
- Expires is a fallback when Cache-Control is absent
Common directives
- no-store: do not store
- no-cache: revalidate before use
- max-age=0: immediately stale
- max-age=31536000, immutable: long cache
Notes (this tool)
- Older intermediaries or clients may mix Pragma/Expires interpretations.
- Final behavior is determined by the combination of CDN, browser, and app-side cache implementations.
About this page
What does this page do?
Organize Cache-Control / Pragma / Expires / Age roles and relationships into a practical overview.
Precedence (quick)
- Cache-Control is usually the primary control
- Pragma is mainly legacy for HTTP/1.0 compatibility
- Expires is an absolute expiry (fallback when Cache-Control is absent)
- Age shows the seconds a response has been cached by intermediaries
Common patterns
- no-store: do not store at all
- no-cache + must-revalidate: always revalidate
- max-age=0: immediately stale (revalidate)
- max-age=31536000, immutable: long-lived cache
Debugging workflow (recommended)
- Extract Cache-Control/Expires/Age via Response Headers Parser
- Use this page to confirm precedence and meaning
- Inspect details with Cache-Control Inspect / Expires Inspect
Recommendations by use case
- API (JSON): use no-store for sensitive data; otherwise no-cache + validators
- HTML: no-cache + must-revalidate or short max-age + validators
- Static assets: long max-age + immutable + versioned URLs
Related tools
- Cache-Control Inspect
- Pragma Cache Inspect
- Expires Inspect
- Age Inspect
What this page covers
- Summarize Cache-Control / Pragma / Expires / Age relationships
- Review common practical patterns
Operational notes
- Cache behavior changes across browser, CDN, and proxy layers, so compare captures from the same observation point.
- Header-only diagnosis may be insufficient. Also review application cache invalidation strategy and key design.
Referenced specs
- RFC 9111 (HTTP Caching)
- RFC 9110 (HTTP Semantics)
- MDN: HTTP caching
FAQ
Which takes precedence: Cache-Control or Expires?
Cache-Control generally takes precedence. Treat Expires as a fallback.
Is Pragma still needed?
Mostly for legacy compatibility. Modern setups should center on Cache-Control.
References
Page-specific case studies
This overview is for policy design and directive precedence before implementation.
- Design with Cache-Control precedence over Expires when both exist.
- Treat Pragma as legacy compatibility only.
- Interpret Age as residence time inside shared caches.
Page-specific implementation checklist
- Document shared cache policy and align teams.
- Maintain separate default templates for API, HTML, and static assets.
- Audit conflicting directives during migration from legacy headers.
- Review real-world response headers regularly after rollout.
Next to view (diagnostic order)
These links are generated from site_map rules in recommended diagnostic order.
- Cache Not Working Troubleshooting — Troubleshoot cache-not-working symptoms step by step from headers
- HTTP Cache Mismatch — Identify root causes of cache mismatches
- Cache Response Analyzer — Judge cacheability from response headers
- How to Diagnose Stale Content After Deployment — Check cache policy by HTML/API/static assets to isolate stale deployment issues quickly
- How to choose cache tools — Route stale-update, missing-304, and CDN-only mismatch issues to the right tools
- Cache-Control Inspect — Parse and interpret Cache-Control directives
- Cache Key Inspect — Visualize cache-key splits from URL, Vary, and headers
- ETag Inspect — Parse ETag and If-None-Match consistency
Same-theme links
Cache Control
Diagnose delivery policy across Cache-Control/Expires/Age
- Cache Not Working Troubleshooting — Troubleshoot cache-not-working symptoms step by step from headers
- HTTP Cache Mismatch — Identify root causes of cache mismatches
- Cache Response Analyzer — Judge cacheability from response headers
- Cache Key Inspect — Visualize cache-key splits from URL, Vary, and headers
- Cache Diagnostic — Run cross-header diagnostics for HTTP caching
- Cache-Control Inspect — Parse and interpret Cache-Control directives
- Pragma Cache Inspect — Parse Pragma and inspect legacy cache control behavior
- Expires Inspect — Parse Expires and Date to inspect freshness behavior
- Age Inspect — Parse Age to estimate shared-cache residency time