{"uid":"cap_pmoDtwM-8Sl0l4XJ7apEu","slug":"dev-reference-cache-control-header-explainer-b8300bcc","name":"Dev Reference: Cache-Control Header Explainer","description":"Parse a Cache-Control value, explain each directive, compute freshness and flag conflicts or leaks.","url":"https://dev-reference.x402tookit.com/cache-control-explain?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["value"],"properties":{"kind":{"enum":["response","request"],"type":"string","description":"response (default) or request"},"usage":{"enum":["static","personalized","sensitive"],"type":"string","description":"Optional hint: static, personalized or sensitive, to check the value against that use"},"value":{"type":"string","description":"The header value, for example public, max-age=3600, no-cache"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"kind":{"type":["null","string"]},"flags":{"type":["array","null"],"items":{"type":"object","properties":{"fix":{},"message":{"type":["null","string"]},"severity":{"type":["null","string"]},"directive":{"type":["null","string"]}}}},"source":{"type":["null","string"]},"reasons":{"type":["array","null"]},"storage":{"type":["null","string"]},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"highCount":{"type":["null","number"]},"directives":{"type":["array","null"],"items":{"type":"object","properties":{"value":{"type":["null","string"]},"meaning":{"type":["null","string"]},"directive":{"type":["null","string"]}}}},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"mediumCount":{"type":["null","number"]},"usageChecked":{},"browserFreshnessSeconds":{"type":["null","number"]},"sharedCacheFreshnessSeconds":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_t9PiNNJPjEj3byFlybqUg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses a Cache-Control header value, explains each directive in plain language, computes freshness durations, and flags conflicts or sensitive data leaks.","exampleAgentPrompt":"Can you explain what 'private, no-cache, max-age=0, must-revalidate' means in a Cache-Control response header, compute how long it stays fresh, and flag any conflicts or potential privacy issues?","exampleUseCases":[{"title":"Debug a CDN caching problem","prompt":"My API is returning Cache-Control: no-store, public and I think there's a conflict — can you parse that response header and tell me if there are any issues or contradictions?"},{"title":"Audit cache headers for sensitive pages","prompt":"I have Cache-Control: max-age=3600 on my login page response header — check that for me and flag any security or privacy leaks, treating it as sensitive content."},{"title":"Understand caching behavior for static assets","prompt":"Can you explain what Cache-Control: public, max-age=86400, immutable does on a response header for a static asset, including how long browsers and shared caches will hold it?"}],"resultDescription":"Returns a structured breakdown of each Cache-Control directive with its plain-English meaning, a computed browser freshness duration and shared cache freshness duration in seconds, a storage classification, a summary verdict, a list of flags with severity levels and fix suggestions, and a degraded indicator if the header is partially unrecognized. Also includes counts of high and medium severity issues.","failureModes":["Missing 'value' query parameter returns an error","Malformed or unrecognized directive combinations may produce partial results with notChecked fields","Invalid 'kind' enum value (not 'request' or 'response') may cause a validation error","Empty string value may return a minimal or error response"],"whenToPreferThis":"Use this endpoint when you need to programmatically interpret, audit, or debug a Cache-Control header value — especially when checking for security issues like caching sensitive data, detecting directive conflicts, or computing exact freshness lifetimes for both browsers and shared caches like CDNs. Prefer it over general HTTP header explainers when Cache-Control-specific freshness math and conflict detection are needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:13:40.463Z","isFirstParty":false,"canonicalSlug":"dev-reference-cache-control-header-explainer-b8300bcc"}