What does Prefix caching mean in inference serving?
Prefix caching preserves KV cache blocks for prompt prefixes that recur across requests. A matching request can reuse the cached prefix and compute only the uncached suffix. In vLLM, block hashes cover each block and its preceding prefix, so reuse requires fully matching leading blocks. Partial prefix overlap still reuses complete matching blocks; an incomplete trailing block is not reused. Put stable content first, with gains depending on cache capacity and eviction.