Expand description
Prefix caching trait for KV block reuse (SDD).
When multiple requests share a common prompt prefix, previously-computed KV cache blocks can be reused instead of re-running prefill. The cache is indexed by token sequences at block granularity via a radix tree.
Two implementations:
NoPrefixCaching: no-ops (zero overhead when disabled)RadixTree(seecrate::radix_tree): full radix tree with LRU eviction
Structs§
- Evicted
Blocks - Result of evicting LRU cached blocks (Phase 6.1.e).
- Insert
Acquired - What an
insertnewly took ownership of, so the caller can take the matching references. - NoPrefix
Caching - No-op prefix cache (zero overhead when disabled).
- Prefix
Match - Result of looking up a token sequence in the prefix cache.
Enums§
Traits§
- Prefix
Cache - Trait for prefix caching strategies.