the.ai

Context / Serving

verified

Prefix Caching

Many requests to the same system start identically — the same system prompt, the same tool definitions, the same document. Computing that prefix again for every request is work already done. Prefix caching keeps the attention state for a shared prefix and starts each request from where the shared part ended.

Viz primitive · budget-splitshared-prefix = 30

shared-prefix holds 60% of the budget; rest holds the remaining 40%.

Prompt tokens shared across requests and served from cache, against the per-request tokens that must be computed, in tokens. Drag the shared prefix up to watch prefill become almost free — and multiply by a hit rate that depends on the traffic, not the model.

30

Reviewed by opendroid · 2026-08-18