Understanding LLM Context Caching and Rate Limits: Why Returning to an Old Chat Triggers Throttling
This article explains why free LLM services restrict inactive sessions and compress input limits, tracing the root cause to context cache expiration and the repeated prefill computation it forces. It covers which user groups are most affected, practical techniques such as session externalization, summarization, and cache-friendly usage, and the platform-side tradeoffs involving observability, tiered quotas, and transparent rules.
1. The Trigger: Why Tighter Free Quotas Sparked Backlash
Recently, a free LLM service began imposing usage limits on individual users because of strained compute capacity. The typical symptoms:
- Long-inactive historical sessions can no longer be continued; users must start a new session or export their history.
- Single-input length is compressed to the tens-of-thousands-of-characters range.
- The number of interactions per unit of time is capped, and after continuous use for a while, the system reports that resources are busy or the quota is exhausted.
Paid APIs are generally unaffected by these individual-user policies.
The controversy is not about rate limiting itself. It is that users have no sense of where the cost comes from: I said nothing for a week and consumed no resources, so why am I restricted the moment I come back and say one thing? Answering that requires a clear picture of the cost structure of LLM inference.
2. Root Cause: Repeated Computation Caused by Context Cache Expiration
LLM inference is stateless. The model keeps no memory; every turn must re-encode the entire history of the current session before it can generate the next token. To reduce this repeated overhead, engineering practice commonly introduces context caching (typically implemented as reuse and persistence of the KV Cache): in an active session, the intermediate results for the historical portion are retained, so subsequent requests only compute the new content.
The catch is that caches have a lifecycle. Constrained by memory and storage capacity, session caches that sit idle for hours to days get evicted. When the user speaks again, the system must run a full prefill computation from scratch.
Schematically, the cost can be approximated as:
wake-up cost ≈ history length × per-token compute unit priceeffective-turn cost ≈ new input + output length
For a 200,000-character session that has been idle for 7 days, the compute triggered by a single “hello” can be equivalent to a dozen or more normal turns of conversation in that session. This is why “returning silent users” create spike pressure on the cluster: the limit targets not activity level, but the recomputation after cache invalidation.
3. Who Is Affected: Sensitivity Differs Across User Groups
Light users who ask a few questions a day barely notice. The ones truly affected are heavy context dependents:
- Users who pile medical records, exam-prep literature, or business templates into a single session over the long term.
- Content creators who accumulate hundreds of thousands of characters of settings and character profiles inside a session.
- Users building long-running role-play or emotional-companionship interactions.
This kind of usage treats the “session” as a database, which is inherently at odds with the platform’s resource model.
4. Engineering Practice: Turning Long Context from a Burden into a Manageable Asset
4.1 Session Layering and Externalization
Move stable material to external storage (such as object storage) and keep only indexes and summaries inside the session; inject content on demand via retrieval when needed, instead of carrying everything in full at once.
# Pseudocode: retrieval augmentation instead of an ultra-long contextdef build_prompt(query, session_id):hits = vector_search(query, top_k=5, scope=session_id)summary = load_summary(session_id) # from external storagereturn f"Summary:{summary}\nMaterial:{hits}\nQuestion:{query}"
4.2 Summarization and Rolling Memory
Summarize history in segments to form a combination of “long-term summary + recent verbatim text”, keeping token growth close to constant.
4.3 Periodic Persistence and Proactive New Sessions
Write key conclusions to external documents and split sessions by topic to avoid unbounded growth in a single session; this also improves cache hit rate.
4.4 Cache-Friendly Calling Patterns
Keeping a session continuously active, reducing long interruptions, and controlling single-input size all significantly lower the probability of recomputation.
5. Capacity and Cost: How the Platform Side Makes Tradeoffs
For the service provider, the requirement is an observability system: use logging services and monitoring alerts to track cache hit rate, prefill latency, average session length, and idle distribution; use message queues to smooth peaks and container platforms to scale elastically; set tiered quotas for different user groups and meter recomputation-heavy requests separately. Rate limiting is not the goal but a means of allocating scarce compute to high-value requests. What matters is transparent rules, predictable quotas, and exportable data.
6. Conclusion
The dispute around long context and cache invalidation is essentially a mismatch between the resource model and user habits. On the user side, context externalization, summarization, and session splitting can keep the experience stable within free quotas; on the platform side, observability, tiered quotas, and transparent rules reduce misunderstanding and public-relations risk. Once the main thread of “recomputation cost” is understood, most seemingly sudden limits can be avoided in advance.
