Skip to content

    Context Caching

    AI fundamentals & modelsPrompt cachingTemporary storage of recurring context
    Reading time: 2 min.Editorially reviewed on:

    Definition

    Reuse of pre-processed input to more efficiently execute repeated model requests.

    A provider can cache common prompt prefixes or explicitly created context objects. A cache hit reduces costs or processing effort depending on the API. Minimum length, validity period and billing are dependent on the provider. Caching does not change model weights.

    Simply explained

    Like prepared working documents, which are ready again at the next request.

    Why it matters in practice

    Relevant for many requests with the same documents, system instructions or tool descriptions.

    Example from business

    Example scenario: An assistant answers different questions about the same comprehensive product catalogue.

    Limits and pitfalls

    • Presuppose cache hits; ignore storage fees or expiration; put dynamic content before common prefixes; reuse outdated information.

    Origin & history

    Current LLM APIs offer different caching mechanisms. Gemini documents implicit caching and also explicit cache objects for the Generate Content API.

    Use in mid-sized companies

    • Identify recurring inputs, measure cache usage, and compare costs including storage against uncached calls.

    Frequently asked questions

    Is this training?

    No. Does it always save money? No, usage and pricing plan decide. Does it enlarge the context window? No.

    Sources

    Source check: 10/09/2026. Definition and documented classification verified; examples describe possible applications.

    Editorially reviewed on:

    On this page

    Next step

    Put knowledge into practice