711
Dictionary

Context Caching

Reusing pre-processed input across requests to cut cost and latency.

1 min readupdated 2026-07-04

/ quick answer

Anthropic and OpenAI cache expensive prefixes (long system prompts, docs) between calls. Cached tokens are ~10x cheaper and skip re-encoding — key for RAG and agent loops. Reusing pre-processed input across requests to cut cost and latency.

Reusing pre-processed input across requests to cut cost and latency. Anthropic and OpenAI cache expensive prefixes (long system prompts, docs) between calls. Cached tokens are ~10x cheaper and skip re-encoding — key for RAG and agent loops. In practice: A 50k-token system prompt costs $0.05 fresh but $0.005 cached across the next 5 minutes.
Definition
Anthropic and OpenAI cache expensive prefixes (long system prompts, docs) between calls. Cached tokens are ~10x cheaper and skip re-encoding — key for RAG and agent loops.
Example
A 50k-token system prompt costs $0.05 fresh but $0.005 cached across the next 5 minutes.

/ frequently asked

What is Context Caching?

Anthropic and OpenAI cache expensive prefixes (long system prompts, docs) between calls. Cached tokens are ~10x cheaper and skip re-encoding — key for RAG and agent loops.

What is an example of Context Caching?

A 50k-token system prompt costs $0.05 fresh but $0.005 cached across the next 5 minutes.

Why does Context Caching matter?

Reusing pre-processed input across requests to cut cost and latency.

What should I learn after Context Caching?

Open the related workflows and prompts further down this page: they show how this idea is applied in a real task, step by step.

/ continue exploring

Related concepts

The vocabulary this page depends on.

  • →Context Engineering

    Context engineering is the discipline of deciding exactly what information enters a model's context window, in what order and at what cost.

  • →Cost Per Token

    The unit economics of LLM APIs.

  • →MCP Resources

    MCP resources are addressable read-only context — files, records, docs — that a client can pull into the model instead of calling a tool.

  • →MCP (Model Context Protocol)

    Open protocol that lets LLMs connect to tools, data sources and apps through a standard interface.

all dictionary →

Related workflows

Turn this into a repeatable process.

all workflows →

Related tool stacks

The tools that run it in production.

all tool stacks →

Comparisons & alternatives

Pick between the options.

all comparisons →

Long-form guides on this topic