When Fancy Eviction Fails: Rethinking Cache Replacement For LLM Prefix Reuse
cs.DC, cs.LG
Submitted: 2026-09-24
Updated: 2026-10-01
Comments: 20 pages, 20 figures, 6 tables
Code: https://github.com/cacheMon/cache_
License: http://creativecommons.org/licenses/by/4.0/
The gist: Long-running LLM applications repeatedly send growing context, making prefix caching critical for reducing prefill cost.
Terminology
Abstract
Long-running LLM applications repeatedly send growing context, making prefix caching critical for reducing prefill cost. Yet prefix-cache behavior under agentic workloads remains poorly understood. We study production traces from two companies and evaluate 14 eviction algorithms across HBM-constrained and large memory-pool settings. Despite a large gap to Belady, sophisticated policies designed for traditional caches provide little benefit over LRU. The reason is structural: prefix reuse is dominated by the regular pacing of active sessions, making recency unusually predictive. Prefix caching nevertheless introduces new challenges, including heavy-tailed session footprints and highly variable miss costs as attention computation grows with sequence length. We introduce the compute-savings ratio and two offline oracles to quantify these effects. Our results show that effective prefix-cache management should retain recency as its foundation while selectively adding quick demotion for one-hit prefixes, compute-aware partial eviction for expensive misses, and capacity-dependent eviction granularity. We will release the traces and simulator to support future research.
Sources
- State of AI: An Empirical 100 Trillion Token Study with OpenRouter
- Scaling Laws for Neural Language Models
- Mixture-of-Experts Meets Instruction Tuning:A Winning Combination for Large Language Models
- Strata: Hierarchical Context Caching for Long Context Language Model Serving
Related papers
- iScheduler: Reinforcement Learning-Driven Continual Optimization for Large-Scale Resource Investment Problems
- SAMM: Sharded Automated Market Maker
- InferScale: GPU-Native KV Injection for Personalized LLM Serving
- Vigil: Accountable Liveness against Selective Silence
- Steelhead: Interleaving Partially Synchronous and Asynchronous Commit Rules on a Shared DAG
- Democratizing MoE inference on commodity GPUs with CoMoE