Skip to content
BEAD

Cache-Control Header Builder

Build HTTP Cache-Control headers with presets for static assets, APIs, and private responses.

Cache-Control header
Cache-Control: public, max-age=3600
Browser caches for
1 hour
CDN caches for
1 hour
</>Use this tool programmaticallycurl · JavaScript · MCP

Same tool, callable from any HTTP client or from Claude (via MCP). Anonymous: 100 req/day per IP. Sign up for 1,000 req/day.

curl
curl https://api.b-e-a-d.com/tools/cache-control-builder/run \
  -H "Content-Type: application/json" \
  -d '{
  "maxAge": 0,
  "sMaxAge": 0,
  "immutable": false,
  "noStore": false,
  "noCache": false,
  "mustRevalidate": false,
  "noTransform": false,
  "proxyRevalidate": false,
  "swr": 0,
  "sie": 0
}'
JavaScript (fetch)
const res = await fetch("https://api.b-e-a-d.com/tools/cache-control-builder/run", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "maxAge": 0,
  "sMaxAge": 0,
  "immutable": false,
  "noStore": false,
  "noCache": false,
  "mustRevalidate": false,
  "noTransform": false,
  "proxyRevalidate": false,
  "swr": 0,
  "sie": 0
}),
});
const data = await res.json();
console.log(data.result);
MCP (Claude Desktop / Claude Code)
# In Claude Desktop / Claude Code, add to your MCP config:
{
  "mcpServers": {
    "bead": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.b-e-a-d.com"]
    }
  }
}

# Then ask Claude to call:
mcp__bead__bead_cache_control_builder

Full reference: developer docs · OpenAPI spec

Public vs private

public lets shared caches (CDNs, proxies) store the response. privaterestricts it to the user's own browser cache — use it for anything personalized.

max-age vs s-maxage

max-age applies to every cache. s-maxageoverrides it for shared caches, so you can tell your CDN to cache longer than the browser does.

stale-while-revalidate

Lets a cache serve the stale response while it fetches a fresh copy in the background — a popular pattern for SWR-style UX.

You might also like