{"uid":"cap_h3eqtBXb9NGGoKk58Bhm-","slug":"writerslogic-http-cache-explain-c6f74058","name":"WritersLogic HTTP Cache Explain","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/http-cache-explain?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"cors":{"type":"object","required":["origin"],"properties":{"method":{"type":"string","maxLength":20},"origin":{"type":"string","maxLength":300,"description":"Serialized request origin, e.g. https://app.example, or null."},"preflight":{"type":"boolean","description":"The supplied response is the OPTIONS preflight response."},"credentials":{"type":"boolean","description":"Request credentials mode include."},"headerNames":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":30,"description":"Request header names beyond the CORS-safelisted ones; safelisting by value is not evaluated."}},"additionalProperties":false},"request":{"type":"object","properties":{"method":{"enum":["GET","HEAD"],"type":"string"},"headers":{"type":"array","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","maxLength":100},"value":{"type":"string","maxLength":1024}},"additionalProperties":false},"maxItems":100,"description":"Only Authorization presence and Vary-selected names matter; values may be redacted."}},"additionalProperties":false},"response":{"type":"object","required":["status","headers"],"properties":{"status":{"type":"integer","maximum":599,"minimum":200,"description":"Final status; 1xx is not cached."},"headers":{"type":"array","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","maxLength":100},"value":{"type":"string","maxLength":4096}},"additionalProperties":false},"maxItems":100}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","required":["url","status","location"],"properties":{"url":{"type":"string","maxLength":2048},"status":{"type":"integer","maximum":399,"minimum":300},"location":{"type":"string","maxLength":2048},"cacheControl":{"type":"string","maxLength":1024}},"additionalProperties":false},"maxItems":30,"minItems":1}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_fPgA7KZ8IkiKyv-Zx-5Ns","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes HTTP response headers (and optionally request headers, CORS parameters, and redirect chains) to explain cacheability, freshness lifetime, Vary behavior, CORS outcomes, and redirect limits per RFC 9111 and the Fetch Standard","exampleAgentPrompt":"Can you explain whether this HTTP 200 response is cacheable and how long it'll stay fresh? The headers are: Cache-Control: public, max-age=3600, Vary: Accept-Encoding, and Last-Modified: Mon, 01 Jan 2024 00:00:00 GMT. The request was a GET and the origin is https://app.example.com.","exampleUseCases":[{"title":"Debugging CDN not caching API response","prompt":"My API returns Cache-Control: no-cache but I think it should be cacheable — can you analyze these response headers with status 200 and tell me whether a shared cache like a CDN is allowed to store it, and what the freshness lifetime would be?"},{"title":"CORS preflight failure investigation","prompt":"Our frontend at https://app.example.com is getting blocked on a preflight OPTIONS request to our API — can you check the response headers including Access-Control-Allow-Origin and Access-Control-Allow-Methods and tell me whether the CORS check passes for a credentialed request using the Authorization header?"},{"title":"Redirect chain loop detection","prompt":"I have a redirect chain of three hops I want to audit — can you check if there's a redirect loop or if we're close to the 20-redirect browser limit? Here are the URLs, status codes, and Location headers for each hop."}],"resultDescription":"A structured explanation covering: (1) whether a shared cache and a private cache may each store the response, (2) the computed freshness lifetime and which header it was derived from (s-maxage, max-age, Expires minus Date, or 10% Last-Modified heuristic), (3) Vary header analysis, (4) any invalid max-age or Expires values, (5) CORS check outcome including Allow-Origin, Allow-Credentials, Allow-Methods/Headers, and Vary: Origin evaluation, (6) preflight result if applicable, and (7) redirect loop detection or 20-redirect limit breach.","failureModes":["Missing required response status or headers field returns a validation error","Invalid header values (e.g. non-integer max-age) are flagged as invalid rather than parsed","CORS analysis requires at minimum an origin value in the cors object","Redirect items missing required url, status, or location fields cause rejection","Status codes outside 200-599 range are rejected","Payment failure returns 402 when USDC balance is insufficient"],"whenToPreferThis":"Use this endpoint when you need a standards-compliant, deterministic analysis of HTTP caching behavior based on RFC 9111 and CORS behavior per the Fetch Standard, without fetching live URLs or depending on a clock. Ideal for CI pipelines, agent debugging workflows, and situations where you need a neutral interpretation of headers rather than CDN-specific behavior. Prefer this over manual header reading when you need to reason about Vary, CORS preflight, or redirect chains simultaneously.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T00:32:40.055Z","isFirstParty":false,"canonicalSlug":"writerslogic-http-cache-explain-c6f74058"}