CCP

Cache-Control Parser

Parse cache directives and compare browser and shared-cache freshness

API & HTTP
πŸ”’ 100% client-side β€” your data never leaves this page
Maintained by Evanβ€’Updated: September 30, 2026β€’Reviewed: September 29, 2026
Options

Enter one response Cache-Control value per line to inspect freshness lifetimes, storage restrictions, and warnings. Advanced mode includes worked examples.

Response directives alone cannot guarantee storage or a cache hit. Check the method, status, Authorization, Vary, matching entries, and cache implementation. Supply the current response age; this model does not calculate Age/Date or model Expires, heuristic freshness, request directives, offline policies, or every extension.

Output
Parsed result appears here
Processed locally in your browser
Page reading mode

The full guide also includes pitfalls, worked examples, snippets, FAQs, and related tools for checking results or troubleshooting.

About this tool

Cache-Control Parser reads one response-header value per line and shows directives, storage restrictions, and freshness signals. Compare public, max-age=60, s-maxage=600: max-age gives browsers a 60-second freshness lifetime, while s-maxage gives shared caches 600 seconds. In no-store, max-age=600, max-age does not grant permission to store or reuse the response; simplify that policy to no-store if storage must remain disabled. Private, no-cache permits private storage subject to other requirements but requires successful validation before reuse. The simulator is an explanation of selected directives, not proof that a browser or CDN will cache a response. It does not model the full request, response status, Authorization, Vary matching, CDN overrides, or the status-dependent must-understand exception. All parsing runs locally in your browser.

Compare & Decision

No storage vs validation on every reuse

no-store

Use when the response must not be stored or reused by caches.

private, no-cache

Use when private storage is acceptable but each reuse must be successfully validated.

Note: These examples use unqualified directives and assume no overriding extension such as the status-dependent must-understand exception. no-store is a cache instruction, not a complete privacy guarantee.

Direct Answers

Q01

Does no-store, max-age=600 allow ten minutes of caching?

No. For this header, no-store prohibits storing or reusing the response. max-age adds no storage permission. To retain that policy while removing an ineffective directive, use no-store.

Q02

Are max-age=60 and s-maxage=600 contradictory?

No. In public, max-age=60, s-maxage=600, the browser freshness lifetime is 60 seconds and the shared-cache lifetime is 600 seconds. Storage eligibility still depends on the rest of the exchange.

Q03

Can immutable and must-revalidate coexist?

Yes. immutable concerns reuse while a response is fresh; must-revalidate requires successful validation before a stale response is reused. They address different stages and are not inherently contradictory.

Q04

What does the simulator leave out?

It does not model request methods, response status, Authorization, Vary matching, validators, CDN configuration, Expires or heuristic freshness. It also does not model must-understand, which can let a cache that understands the status-specific requirements ignore no-store. Field-qualified private/no-cache and invalid or duplicate freshness values are reported as UNKNOWN. A header-only result is not proof of a real cache hit.

Failure Clinic (Common Pitfalls)

Reading public or a positive max-age as proof of a cache hit

Cause: A Cache-Control value cannot describe the request, response status, cache key, Authorization handling, or cache configuration.

Fix: Verify the complete exchange and actual cache status. Treat the tool output as directive-level guidance.

Treating age equal to max-age as fresh

Cause: Freshness uses a strict comparison: current age must be less than the freshness lifetime.

Fix: With max-age=60, age 59 is fresh and age 60 is stale. Revalidation and permitted stale reuse must be considered separately.

Interpreting a missing TTL as immediate expiration

Cause: Expires or heuristic freshness may supply a lifetime outside this header.

Fix: Report freshness as undetermined from Cache-Control alone and inspect the remaining response headers.

Scenario Recipes

01

Keep a no-storage policy when simplifying a header

Goal: Remove an ineffective freshness directive without enabling storage.

  1. Parse no-store, max-age=600 as one response value.
  2. Keep no-store and remove max-age=600; do not replace the header with public or a TTL-only policy.
  3. Check the emitted response in the browser network panel and the origin/CDN configuration. If must-understand is present, review its status-dependent behavior separately.

Result: For the illustrated header, the simplified value no-store preserves the prohibition on storage and reuse.

Production Snippets

Retain the no-storage requirement

HTTP

Cache-Control: no-store

Browser: 60 seconds; shared cache: 600 seconds

HTTP

Cache-Control: public, max-age=60, s-maxage=600

Allow private storage, require validation before reuse

HTTP

Cache-Control: private, no-cache

Suggested Workflow

Frequently Asked Questions

Does no-store conflict with max-age?

In no-store, max-age=600, no-store prohibits storing and reusing the response; max-age does not override it. Preserve that restriction when cleaning up the header: use no-store. The status-dependent must-understand exception is outside this simulator.

Can max-age and s-maxage appear together?

Yes. With public, max-age=60, s-maxage=600, browsers use a 60-second freshness lifetime and shared caches use 600 seconds. These are separate scopes, not conflicting TTL values.

What does private, no-cache mean?

The unqualified private directive excludes shared-cache storage. A private cache may store the response when other requirements are met, but no-cache requires successful validation before every reuse. It does not mean no storage.

Can this header alone prove that a response will be cached?

No. Storage and reuse also depend on the request method, status, Authorization, Vary, validators, cache implementation and configuration. must-understand can override no-store in specific status-aware caches; that exception is not simulated.

How does the freshness simulation work?

It compares a supplied age against an explicit freshness lifetime: fresh means age is strictly less than that lifetime. At the lifetime boundary the response is stale. Without a usable max-age or s-maxage value, the tool cannot determine freshness from this header alone; it does not calculate Expires or heuristic freshness.

Can I parse multiple lines locally?

Yes. Each line is analyzed independently as one Cache-Control response value; lines are not merged into one response. Parsing stays in your browser.

Keep browsing