AI inference glossary
Serving

Prefix caching

Also known as prompt caching, automatic prefix caching

In plain English

Prefix caching remembers the work for a repeated beginning, such as the same system prompt, so the model can skip that work next time.

Technical definition

Prefix caching reuses KV-cache state when multiple requests begin with the same token sequence.

Engineering details

A repeated system prompt, shared document, or common conversation prefix can reuse cached states. A cache hit can reduce prompt computation and time to first token.

Why it matters

Production workloads with repeated prefixes may outperform synthetic random-token benchmarks. The benefit depends on hit rate, cache capacity, eviction policy, and whether requests route to workers that hold the needed state.

How to read it in InferenceX

InferenceX generally disables prefix caching on random datasets to isolate full prompt processing from cache policy. Treat benchmark cost as a no-hit baseline unless the recipe says otherwise.