Keeping cached context reusable: intent-aware eviction, cluster-wide segment reuse and selective recomputation
Three serving papers posted on 2026-11-06 go after the same waste, prefill work recomputed for context a system has already processed, at three different points: which conversation prefixes to keep in GPU memory, how to reuse document and tool-output segments across a cluster when the text before them differs, and which tokens to recompute so that independently cached segments still attend correctly to each other. Together they show that cache benefit now depends as much on workload statistics, cluster state and correction budgets as on raw capacity.
Eviction that estimates whether the user will come back
Prefix caching stores the key-value states of earlier conversation turns and reuses them when the next request shares the prefix, so the server computes only the new tokens. The intent-aware caching paper notes that providers charge ten times less for cached input tokens, yet hit rates stay low because a cached prefix is useful only if the user sends another turn, the gap before that turn varies widely, entries grow with context length, and a hit at one turn requires keeping the whole prefix from earlier turns. Recency, frequency and size, the signals behind LRU, LFU and GDSF, do not capture any of that. A learned approach that predicts only whether a conversation will continue misses how long the wait will be, and retraining it is expensive when workloads drift within an hour.
The paper's observation is that the user's intent predicts reuse. Code-generation conversations, for example, tend to run more turns and have longer gaps between turns than translation requests or chitchat. Intent-aware caching classifies each request with a lightweight intent classifier, periodically estimates per-intent continuation frequencies and a fitted delay distribution from recently completed requests, and uses those statistics to imitate a size-aware offline oracle policy. Exact offline optimization is NP-complete for variable-size entries, so the oracle itself is an approximation.
The evaluation uses the two public conversation datasets that include both content and timestamps, together about 1.2 million conversations, on a four-GPU server with models from 8 billion to 110 billion parameters. At a 140,000-token cache capacity on one workload, the policy reached a 34.6 percent hit rate, against 12.2 percent for LRU and 18.8 percent for the learned baseline. On the largest model, time to first token fell to 3.76 seconds from 6.98 seconds under LRU, and at 10 requests per second average latency was 3.41 seconds against 7.01. It also reached a higher hit rate with 24.4 GB of KV cache than the learned baseline did with 51.9 GB, a 53 percent memory saving.
When the prefix differs but the document does not
Retrieval-augmented generation and agents assemble prompts from independent segments: retrieved documents, tool outputs, memory and skill files. Prefix caching reuses only content that matches continuously from the start of the request, so a document seen before under a different preamble is recomputed. Position-independent caching relaxes that, reusing segments at new positions and correcting the resulting attention deviations with partial recomputation. The Nebula paper's analysis of six RAG and agent workloads finds that position-independent reuse could recover about 72.1 percent of the tokens prefix caching misses on average, even though production systems already exceed 90 percent hit rates on agent workloads.
The obstacle is the cluster. Existing distributed caches index by prefix, so a router cannot find a segment cached on another node, and schedulers treat each request as one unit, so they cannot prefill its cold segments in parallel. Nebula makes segments first-class scheduling units and adds three mechanisms. The router records expected cache locations and compute load at dispatch, and workers confirm or correct those records through residency, eviction and completion events, keeping the cluster view timely without trusting either source alone. Ghost-hit feedback, which counts demand for entries after they were evicted, tunes how shared cache capacity is split between prefix and segment entries. A single estimate of prefill completion time combines queueing, computation and KV transfer, and a greedy search picks parallelism and placement for each request. Across four models and four RAG and agent workloads, Nebula cut median time to first token by 61.4 percent on average against the strongest baseline and recovered 76.1 percent of the tokens prefix caching missed.
Correcting the cross-chunk attention that independent caches skip
A segment cached on its own lacks attention to whatever preceded it in the new prompt, so position-independent reuse recomputes a subset of tokens over the full context. DARIC argues that existing methods choose that subset badly. Online methods measure the deviation between independent and full caches, which adds runtime overhead and usually recomputes a fixed share of tokens even when a prompt has only a few long chunks; rule-based methods apply fixed heuristics that do not track how deviation differs across models and datasets. At the system level, the most widely used open implementation modifies the execution flow intrusively, disrupting CUDA graphs and optimized attention kernels, and reuse must stay contiguous from the start of the prompt: with cached chunks A, B and C and a prompt ordered B, A, D, C, only B and A can be reused.
DARIC's analysis across models and datasets finds four consistent patterns. Deviation inside a chunk falls with token position, so a chunk's first tokens matter most; deviation from missing cross-chunk attention grows with the chunk's index; total deviation grows with the number of independent chunks; and the quality of the most recent context window is critical. Its selection policy follows directly: recompute the first tokens of each chunk, scale that budget with the chunk index, set the total budget by the number of chunks, and always include the latest context window. Chunks are padded to the block size of the paged attention kernels, so independent caches are built with unmodified kernels, and the system integrates with a widely used open inference engine with minimal changes. Across datasets, models, and RAG and agentic tool-calling scenarios, the authors report that DARIC outperforms state-of-the-art methods, with a 1.1 to 4.5 times speedup in time to first token and negligible loss in generation quality.
Three budgets now set prefill cost
Read together, the papers describe three budgets an operator now manages. The memory budget decides which entries stay resident, and intent-aware caching shows that workload knowledge, not only recency, should drive it. The placement budget decides whether to fetch a remote segment or compute it locally, which Nebula prices explicitly with transfer, queueing and compute costs. The correction budget decides how many tokens to recompute when reusing segments out of position, which DARIC ties to the number and order of chunks. The budgets interact: position-independent reuse raises the value of keeping a popular document resident even after the conversation that loaded it ends, and prompts built from many short chunks need more correction, which eats into the savings.
- Measure against an oracle: Compare your eviction policy's hit rate with a size-aware offline oracle on your own traces; the gap is the headroom a smarter policy can claim.
- Profile segment reuse: Count how many tokens prefix caching misses that recur as whole documents or tool outputs under different preambles before investing in position-independent reuse.
- Test quality at your chunk counts: Validate generation quality under segment reuse at the number of chunks your prompts actually contain, since deviation grows with chunk count.
- Check integration cost: Prefer designs that keep the inference engine's scheduling and kernel optimizations intact; an intrusive integration can cost more than the recomputation it saves.
Sources
- Intent-Aware Caching for Efficient LLM Serving · arXiv · 2026-11-06
- Nebula: Distributed Position-Independent Caching for LLM Serving · arXiv · 2026-11-06
- DARIC: A Position-Independent KV Cache Reuse System with Distribution-Aware Recomputation · arXiv · 2026-11-06