← Blog

Engineering

Zero-credit cache hits, explained

May 28, 2026 · SwitchGate team · 4 min read

Every gateway advertises caching. The detail that matters is the billing rule: on SwitchGate, a cache hit costs exactly zero credits — not a discount, not a reduced token rate. If we didn't call the provider, you didn't pay anyone.

Two caches, one rule

Exact-match caching handles the boring, enormous case: identical request bodies (same model, messages, temperature) within your configured TTL. Semantic caching is opt-in per key and matches paraphrases — "cancel my subscription" and "I want to cancel my plan" — using an embedding threshold you control. Both are scoped to your organization; there is no cross-tenant cache, full stop, because your prompts are not another customer's speedup.

Where 30–70% is real (and where it isn't)

The savings figure on our homepage is labeled a placeholder, but the shape is honest: support bots, documentation Q&A, and RAG frontends with repetitive query distributions routinely see hit rates north of 30%. Agentic coding and long-context analysis see almost none — every request is genuinely novel — and we'd rather tell you that than sell you a mirage. The ledger shows your actual hit rate per key from day one, so the question resolves itself with data.

Hits appear on the ledger as $0.000 line items with a cache: hit trace tag. Turning semantic matching on is one toggle per key; turning it off is the same toggle, and nothing about your integration changes either way.

Try it on your own traffic

Free trial credits, one line to switch, and the ledger tells the truth.

Get API key