Cache-Control explainer
Explain a Cache-Control header directive by directive and how browsers and CDNs will treat the response.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/cache-control-explain \
-H 'Content-Type: application/json' \
-d '{"input":{"value":"public, max-age=3600, s-maxage=86400"}}'
import json, urllib.request
body = {'input': {'value': 'public, max-age=3600, s-maxage=86400'}}
request = urllib.request.Request("https://setget.net/v1/tools/cache-control-explain", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/cache-control-explain", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"value":"public, max-age=3600, s-maxage=86400"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "cache-control-explain",
"input": {
"value": "public, max-age=3600, s-maxage=86400"
}
}
{
"input": {
"value": "public, max-age=3600, s-maxage=86400"
}
}
Endpoint: POST /v1/tools/cache-control-explain. Over MCP: run_tool with slug: "cache-control-explain".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
value |
string | yes | The Cache-Control header value (with or without the header name). |
Examples
Input
{
"value": "public, max-age=3600, s-maxage=86400"
}Result
{
"directives": [
{
"name": "public",
"value": null,
"meaning": "Any cache may store the response, even one that would normally be treated as private."
},
{
"name": "max-age",
"value": 3600,
"meaning": "The response is fresh for 1 hour. Caches may reuse it without asking the server during that time."
},
{
"name": "s-maxage",
"value": 86400,
"meaning": "Shared caches such as CDNs and proxies may reuse it for 1 day. For them this replaces max-age."
}
],
"summary": "Browsers may reuse it for 1 hour without contacting the server; shared caches such as CDNs may reuse it for 1 day.",
"warnings": []
}Conflicting directives
Input
{
"value": "Cache-Control: no-store, max-age=60"
}Result
{
"directives": [
{
"name": "no-store",
"value": null,
"meaning": "No cache may store the response at all."
},
{
"name": "max-age",
"value": 60,
"meaning": "The response is fresh for 1 minute. Caches may reuse it without asking the server during that time."
}
],
"summary": "Nothing may store this response: browsers and shared caches fetch it from the server every time.",
"warnings": [
"no-store wins over the other directives, so max-age and public have no effect."
]
}Questions
- Does no-cache mean "do not cache"?
- No. It means "store it, but check with the server before using it". To forbid storing, use no-store.
- What is a shared cache?
- A cache that serves many people, such as a CDN or a company proxy, as opposed to the private cache in one browser.
Related tools
- HTTP headers parserTurn a raw block of HTTP headers into JSON, explain the well-known ones and audit security headers.
http-headers-parse - HTTP status code lookupLook up an HTTP status code or search by words: meaning, typical cause and whether to retry.
http-status - .gitignore testerCheck which paths a .gitignore file ignores and which line decided each one, using real Git matching rules.
gitignore-test - Card number (Luhn) and IBAN validatorCheck a card number with the Luhn checksum and name its network, or check an IBAN by length and mod-97.
luhn-iban-validate - CIDR and subnet calculatorWork out the network, netmask, host range and size of an IPv4 or IPv6 CIDR block, and split it into subnets.
cidr-calc - Cookie parserParse Cookie and Set-Cookie headers into JSON, with warnings about missing security attributes.
cookie-parse