Cache-Aware Prompt Compression:A Two-Tier Cost Model for LLM API Caching
On the map: Efficient LLM inference and serving → KV cache optimization
Abstract (arXiv)
Production LLM deployments combine two cost-reduction primitives: prompt caching (a discounted rate for re-used token prefixes) and prompt compression (fewer tokens sent). The compression literature has standardized on query-aware methods that produce a different compressed prefix per query, mechanically invalidating the prefix-strict cache on every call. We characterize this cost empirically on Anthropic's Sonnet 4.6 API and find caching is far from the rho=1.0 ideal the literature assumes: Sonnet's cache has a two-tier architecture with a sharp threshold near 3,500 tokens, below which the hit rate plateaus at rho~0.83 across 30-call sessions. Our cost model predicts, and experiments confirm, that under realistic rho, query-aware compression beats naive caching at high compression ratios (r>=6). We propose Cache-Aware Prompt Compression (CAPC), pairing query-agnostic compression with explicit cache_control plus a tier-preserving ratio bound that prevents over-compression from pushing the cached prefix into the hot tier. CAPC is the cheapest strategy in 16/16 configurations on LongBench-v2, with mean savings of 49% over cache-only, 64% over query-aware compression, and 90% over vanilla, at quality within 0.05 of the uncompressed baseline. We validate CAPC on three production workloads: an enterprise tool-using assistant with a 94k-token schema prefix (51.7% cost reduction at r=3); a graphify knowledge-graph RAG pipeline across two codebases (9.3x vs cache-all on FastAPI, 2.4x on httpx); and the public tau-bench retail benchmark (50 tasks), where CAPC is the cheapest of four strategies with reward exactly equal to vanilla (both 36/50, p=1.00) while query-aware compression is the most expensive at +40.1% over vanilla -- the first production confirmation of the crossover model's negative-ROI prediction on a public benchmark.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 18 of its 24 references that are in the map. First posted on arXiv 17 Jul 2026.
Builds on
18 of 24 references.
References · 18
- 2024τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domainscited by 1,280
- 2024RouteLLM: Learning to Route LLMs with Preference Datacited by 633
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 443
- 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 367
- 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 279
- 2024A Unified Approach to Routing and Cascading for LLMscited by 71
- 2024500xCompressor: Generalized Prompt Compression for Large Language Modelscited by 45
- 2025Budget-Aware Tool Use Enables Effective Agent Scalingcited by 42
- 2025Auditing Prompt Caching in Language Model APIscited by 19
- 2024Fundamental Limits of Prompt Compression: A Rate-Distortion Framework for Black-Box Language Modelscited by 18
- 2026Don't Break the Cache: An Evaluation of Prompt Caching for Long-Horizon Agentic Taskscited by 18
- 2025xRouter: Training Cost-Aware LLMs Orchestration System via Reinforcement Learningcited by 16
6 more
- 2026Budget-Constrained Agentic Large Language Models: Intention-Based Planning for Costly Tool Usecited by 8
- 2026Prompt Compression in the Wild: Measuring Latency, Rate Adherence, and Quality for Faster LLM Inferencecited by 8
- 2025ProCut: LLM Prompt Compression via Attribution Estimationcited by 5
- 2025Re-FORC: Adaptive Reward Prediction for Efficient Chain-of-Thought Reasoningcited by 4
- 2025Generative Caching for Structurally Similar Prompts and Responsescited by 3
- 2025CompactPrompt: A Unified Pipeline for Prompt Data Compression in LLM Workflowscited by 2
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Not All Tokens Are Worth Caching: Learning Semantic-Aware Eviction for LLM Prefix Caches
- 2025TokenLake: A Unified Segment-level Prefix Cache Pool for Fine-grained Elastic Long-Context LLM Serving
- 2026Sparse Prefix Caching for Hybrid and Recurrent LLM Serving
- 2026PRISM: Fast Online LLM Serving via Scheduling-Memory Co-design
- 2026When Fancy Eviction Fails: Rethinking Cache Replacement For LLM Prefix Reuse
- 2026Asynchronous Verified Semantic Caching for Tiered LLM Architectures
- 2025Compactor: Calibrated Query-Agnostic KV Cache Compression with Approximate Leverage Scores
- 2025Category-Aware Semantic Caching for Heterogeneous LLM Workloads