logo
GeekFormat

Cache-Control Parser

Cache-Control Analyzer

Analyze caching policies, cacheable scope, and freshness TTL. Also generate reproducible headers via the Builder.

Parse Summary

Shared caches allowedfreshness: 10m 0sstale-while-revalidate: 30s
Cacheability
Shared caches allowed
Freshness TTL
10m 0s
Stale-While-Revalidate
30s
Stale-If-Error
-

Builder

public, max-age=600, stale-while-revalidate=30

JSON Preview

{
  "directives": [
    {
      "key": "public",
      "value": null
    },
    {
      "key": "max-age",
      "value": "600"
    },
    {
      "key": "stale-while-revalidate",
      "value": "30"
    }
  ],
  "warnings": [],
  "cacheability": "Shared caches allowed",
  "freshnessSeconds": 600,
  "staleWhileRevalidateSeconds": 30,
  "staleIfErrorSeconds": null
}

Understand Cache-Control online, no more guessing cache directives.

Related

Use Cases

  • Resources not updating after deployment? Paste the response header here to check if cache policy is misconfigured
  • Debug browser cache policies and check no-cache and must-revalidate directives when pages don't update
  • Optimize static asset caching by configuring max-age, immutable, and stale-while-revalidate via the generator
  • Verify no-store is active when checking API response headers to prevent sensitive data from being cached

Features

  • Break down cache strategies: TTL, shared cache, and revalidation timing made clear
  • Optimization made easier: Browser cache, CDN cache, and API cache can be judged separately
  • Better for collaboration: Share parsed results with frontend, backend, and ops teams for joint troubleshooting
  • Ready to deploy: Generated output suitable for server config or further cache policy experiments

How to Use

  1. 1.Paste Cache-Control response header content into the parser, or use the generator to configure cache directives
  2. 2.In parse mode, view TTL, cache scope, revalidation strategy, and warnings
  3. 3.In generate mode, check public/private/no-cache/no-store directives and enter time values
  4. 4.Copy the generated Cache-Control content for server configuration or continue debugging by overwriting input

FAQ

What's the difference between max-age and s-maxage in Cache-Control?

max-age primarily affects browser local cache, while s-maxage targets CDN and shared caches. Breaking down directives helps you identify exactly which cache layer is causing issues.

Why does the browser keep hitting origin despite cache configuration?

Common causes include no-cache, must-revalidate, short cache durations, or conflicting response headers. Parsing helps quickly pinpoint which cache directive is causing misses.

Is this tool suitable for CDN cache and static asset troubleshooting?

Yes. Whether for images, JS, CSS, or API response headers, you can check TTL, shared cache policies, and expiration logic, making it great for pre-launch self-checks.

Is it safe to parse cache response headers online?

This tool parses response header text you paste, with no complex upload process. Perfect for frontend devs, ops, and webmasters to quickly self-check cache configurations.