{"openapi":"3.1.0","info":{"title":"Cache-Control API","version":"1.0.0","description":"Parse and build HTTP Cache-Control headers (RFC 9111). The parse endpoint turns a Cache-Control header into structured, named directives — public and private, no-store, no-cache, no-transform, max-age and s-maxage, must-revalidate and proxy-revalidate, immutable, stale-while-revalidate, stale-if-error, min-fresh and max-stale — together with a quick summary: whether the response is cacheable, whether it must be revalidated before use, its visibility (public or private) and its max-age in seconds. The build endpoint assembles a correct, canonically-ordered header from simple boolean and numeric fields, validating that the second-based directives are non-negative integers and quoting field-list forms of no-cache and private. Everything is computed locally and deterministically, so it is instant and private. Ideal for CDN and edge configuration, caching proxies and reverse proxies, API responses and static-asset tuning, and debugging why a response is (or is not) being cached. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This builds and parses the header string itself; it does not fetch a URL.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/cachecontrol-api","description":"oanor gateway"}],"tags":[{"name":"Cache"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/build":{"get":{"operationId":"get_v1_build","tags":["Cache"],"summary":"Build a Cache-Control header","description":"","parameters":[{"name":"public","in":"query","required":false,"description":"true for public","schema":{"type":"string"},"example":"true"},{"name":"private","in":"query","required":false,"description":"true (or a quoted field list)","schema":{"type":"string"}},{"name":"no_store","in":"query","required":false,"description":"true","schema":{"type":"string"}},{"name":"no_cache","in":"query","required":false,"description":"true (or a quoted field list)","schema":{"type":"string"}},{"name":"must_revalidate","in":"query","required":false,"description":"true","schema":{"type":"string"}},{"name":"immutable","in":"query","required":false,"description":"true","schema":{"type":"string"}},{"name":"max_age","in":"query","required":false,"description":"seconds","schema":{"type":"string"},"example":"3600"},{"name":"s_maxage","in":"query","required":false,"description":"seconds (shared caches)","schema":{"type":"string"}},{"name":"stale_while_revalidate","in":"query","required":false,"description":"seconds","schema":{"type":"string"}},{"name":"stale_if_error","in":"query","required":false,"description":"seconds","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":2,"cache_control":"public, max-age=3600"},"meta":{"timestamp":"2026-06-03T09:25:02.960Z","request_id":"c795f523-b014-482b-ae8c-2f6ed9065ab7"},"status":"ok","message":"Build a Cache-Control header","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/parse":{"get":{"operationId":"get_v1_parse","tags":["Cache"],"summary":"Parse a Cache-Control header","description":"","parameters":[{"name":"header","in":"query","required":true,"description":"A Cache-Control header value","schema":{"type":"string"},"example":"public, max-age=3600, stale-while-revalidate=60"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"count":3,"max_age":3600,"cacheable":true,"directives":{"public":true,"max_age":3600,"stale_while_revalidate":60},"visibility":"public","revalidate_each_time":false},"meta":{"timestamp":"2026-06-03T09:25:03.072Z","request_id":"9c7c4ec1-dcd2-4cd1-8948-b24c811bd449"},"status":"ok","message":"Parse a Cache-Control header","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Cache-Control API","notes":"Numeric directives are in seconds and must be non-negative integers. no-cache means revalidate before use (not 'do not cache'); no-store means do not store at all. This builds and parses the header string — it does not fetch a URL. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/parse","params":{"header":"a Cache-Control header value (required)"},"returns":"the structured directives and a cacheability summary"},{"path":"/v1/build","params":{"public":"true for public","max_age":"seconds","private":"true (or a quoted field list)","no_cache":"true (or a quoted field list)","no_store":"true","s_maxage":"seconds (shared caches)","immutable":"true","max_stale":"seconds","min_fresh":"seconds","no_transform":"true","stale_if_error":"seconds","must_revalidate":"true","proxy_revalidate":"true","stale_while_revalidate":"seconds"},"returns":"the Cache-Control header string"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Parse and build HTTP Cache-Control headers (RFC 9111). The parse endpoint turns a Cache-Control header into structured directives — public/private, no-store, no-cache, max-age, s-maxage, must-revalidate, immutable, stale-while-revalidate, stale-if-error and the rest — with a quick summary of whether the response is cacheable, must be revalidated, its visibility and its max-age. The build endpoint assembles a correct header from simple fields, validating the numeric (seconds) directives and ordering everything canonically. Pure local, no key."},"meta":{"timestamp":"2026-06-03T09:25:03.177Z","request_id":"7edd2a7b-8644-4f65-91a7-994cc1a502da"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":2735,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":425,"monthly_call_quota":12250,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2415,"monthly_call_quota":173500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6215,"monthly_call_quota":910000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/cachecontrol-api"}