catalog / protocols

HTTP Caching

Freshness, validation and invalidation between client, proxy and origin.

16 capabilities 6 sections reference specification

Build against it

# give your agent the catalog — no account, no install
claude mcp add provespec -- npx -y provespec-mcp

# then, from any agent session
spec_get(slug: "http-caching")                → the capability tree
spec_checklist(slug: "http-caching")          → the questions to answer
spec_grade(slug: "http-caching", grades: [...])  → parity % + the gap list

# or just fetch it
curl https://provespec.com/catalog/http-caching/spec.json

Grade every capability below as yes · partial · no · na, with a file reference as evidence. Whatever you leave ungraded counts as missing — the gap list is the work queue.

Or just paste this to your agent

Use the ProveSpec MCP server. Fetch the "http-caching" spec with
spec_get, then walk spec_checklist and grade this repository against it —
one verdict per capability, each with a file reference as the note.
Call spec_grade with the results and give me the gap list as the plan.

If the server is not registered, add it first:
  claude mcp add provespec -- npx -y provespec-mcp

The specification

Freshness 4

  • Cache-Control directives on responses max-age, s-maxage, no-store, no-cache
  • public versus private responses shared caches must respect private
  • Expires as a fallback Cache-Control wins
  • Heuristic freshness when nothing is declared documented, bounded

Validation 3

  • ETag generation, strong and weak
  • If-None-Match returning 304 no body on revalidation hit
  • Last-Modified and If-Modified-Since

Variation 2

  • Vary header lists the request headers that matter Accept-Encoding at minimum
  • Cache key includes method, URL and Vary dimensions

Staleness 3

  • stale-while-revalidate serve stale, refresh in the background
  • stale-if-error serve stale rather than fail
  • must-revalidate for critical resources

Invalidation 2

  • Unsafe methods invalidate the cached entry POST/PUT/DELETE
  • Purge or surrogate-key API for the origin

Strategy 2

  • Immutable assets served with a content hash in the URL max-age=31536000, immutable
  • HTML never cached long without validation the deploy-visibility trap
Download spec.json All 53 specs