Understanding LLM Prompt Cache Pricing Changes: What a Cache-Hit Discount Actually Means for Your Bill

    This article breaks down a structural price adjustment that lowers the cost of cached input tokens for a general-purpose large language model service, while leaving cache-miss input and output pricing unchanged. It explains how prompt caching reuses KV cache from a shared input prefix during the prefill phase, why only stable content placed at the front of a prompt benefits, and how to calculate actual savings from hit rate and token distribution. You will find guidance on restructuring prompts into stable, semi-stable, and volatile layers, append-only conversation handling, cache hit ratio monitoring, canary testing, common pitfalls, and a practical action checklist for reducing per-request inference cost.

    1. Background: A Structural Price Change, Not a Broad Price Cut

    A cloud provider recently announced that, effective 00:00 Beijing time on November 23, 2026, it will adjust the billing rate for a general-purpose large language model service in the Guiyang region. The change is narrow: the unit price of “cache-hit input” is set to 20% of its original value. All other billing items, including cache-miss input and output, remain unchanged.

    The announcement is dense with information but easy to misread as “an 80% across-the-board price cut.” The accurate reading is that this is a structural price adjustment. The price lever applies only to the portion of input tokens whose repeated prefix is served from cache. The real impact on your workload depends entirely on how high your cache hit rate is under your actual call pattern.

    So the right response is not simply to lower your budget expectations. First quantify your traffic characteristics, then decide whether it is worth reworking request construction to improve the hit rate.

    2. How Prompt Caching Works: What Is Actually Cached

    LLM inference has two phases: prefill, a single forward pass over the input that produces the KV cache, and decode, token-by-token autoregressive generation. Compute in the prefill phase scales roughly linearly with input length, which makes it the dominant cost in long-context scenarios.

    The core idea of prompt caching is that if multiple requests share an identical input prefix, the KV cache for that prefix can be reused instead of recomputed. In practice this relies on two conditions:

    1. Exact prefix matching: tokens are compared from the start of the sequence; once one position differs, nothing after it can hit.
    2. An explicit or implicit cache scope: isolated server-side per account or tenant, and bounded by lifecycle and capacity eviction policies.

    Several cost-relevant conclusions follow. Stable content that sits at the very front of the prompt, such as system instructions, tool definitions, few-shot examples, and long documents, is the main source of caching gains. Conversely, volatile fields placed early, such as timestamps, random IDs, or user nicknames, invalidate the entire prefix that follows.

    3. Reading the Billing Model: The Discount Applies Only to Hits

    Let $P{hit}$ be the cache-hit input unit price, $P{miss}$ the cache-miss input unit price, $P{out}$ the output unit price, $N{in}$ the total input tokens, $N{hit}$ the cached portion of the input, and $N{out}$ the output tokens. The cost of a single call is:

    1. Cost = (N_hit * P_hit) + (N_in - N_hit) * P_miss + N_out * P_out

    After the adjustment, $P_{hit}$ becomes 20% of its previous value, so the saving per call is:

    1. Saving = N_hit * P_hit_old * 0.8

    In other words, the reduction in the overall bill is roughly “the share of cache-hit input in total cost multiplied by 80%.” If the hit rate is zero, the bill does not change at all. If inputs are long, outputs are short, and the hit rate is high, the savings can be substantial. This determines the optimization target: increase the share of $N{hit}$, not compress $P{out}$.

    4. Who Benefits Most: Scenario Fit

    • Strong benefit: long system prompts with a high volume of short requests (customer service bots, coding assistants, structured extraction); repeated question answering over a fixed knowledge base; multi-turn conversations where history keeps accumulating.
    • Moderate benefit: batch jobs with a fixed input template but long outputs, where savings are diluted by output cost.
    • Weak or no benefit: requests whose inputs are highly personalized each time with almost no prefix repetition; very short inputs in output-heavy generation tasks.

    5. Implementation: Making Hit Rate an Optimizable Engineering Metric

    5.1 Layer the Request Structure

    Split the prompt into a stable layer, a semi-stable layer, and a volatile layer, and make sure all volatile content comes last:

    1. [Stable] System instructions / tool schema / few-shot examples / long-term knowledge snippets
    2. [Semi-stable] Conversation history (append incrementally, do not modify earlier turns)
    3. [Volatile] Current user question / timestamp / request ID

    The key discipline is append only, never modify. Summarizing, rewriting, trimming, or reordering history messages all break the prefix.

    5.2 Append Strategy for Sessions and Multi-Turn Dialogs

    Multi-turn conversations are naturally cache-friendly, provided each turn keeps the full previous content intact ahead of the new tail. If context compression is unavoidable, use segmentation with fixed boundaries, and compare hit rates under load testing.

    5.3 Observability

    Bring the hit rate into your monitoring and alerting stack, observed at the same level as latency and error rate:

    1. cache_hit_ratio = cached_input_tokens / total_input_tokens
    2. cost_per_request = total_cost / valid_request_count

    Track these metrics separately by business line, model version, and region, so that aggregate averages do not hide local regressions.

    5.4 Canary and Regression Testing

    Take equal-length windows before and after the effective date for an A/B comparison, watching P95 latency and cost per request. A higher hit rate usually also reduces prefill time and improves time to first token, an easily overlooked secondary gain.

    6. Common Pitfalls

    1. Assuming “price cut equals an automatically lower bill” while ignoring a hit rate that may be near zero.
    2. Inserting dynamic variables at the very front of the prompt, permanently disabling a long prefix.
    3. Constantly tweaking the system prompt for “optimization experiments,” causing repeated cache rebuilds.
    4. Doing only the cost math without building hit rate monitoring, leaving optimization effects unverifiable.
    5. Ignoring regional differences and failing to reassess pricing and capacity when deploying across regions.

    7. Action Checklist

    1. Analyze the input token distribution and prefix repetition over the last 30 days to estimate a baseline hit rate.
    2. Restructure prompt templates following the layering in 5.1 and validate with 10% canary traffic.
    3. Add dashboards for hit rate and cost per request, with regression alerts.
    4. Redo capacity and budget planning with the new unit price, and invest the savings first in higher-value context length or concurrency.
    5. Add cache friendliness to the prompt review checklist as a long-term practice.

    Overall, this kind of structural price adjustment sends a clear signal: inference cost governance is shifting from “pick a cheaper model” to “reuse computation more precisely.” Whoever treats cache hit rate as a first-class engineering metric first will achieve lower unit cost at the same service quality.