# Context caching

Reuse of processing for eligible portions of context, subject to model and service rules.

Canonical URL: https://thecompanybrain.com.br/en/glossary/context-caching
Authors: Luiz Gardelin
Updated: 2026-11-15T00:51:31.286Z

Context caching is the reuse of processing associated with eligible portions of context sent to a model. In [OpenAI](/en/glossary/openai)'s documented implementation, the service can reuse processing states for a prefix, the unchanged beginning of a request. New input still needs processing and a new response still needs to be generated. Actual behavior depends on the model and the service's conditions. [Source: OpenAI](https://developers.openai.com/api/docs/guides/prompt-caching).

This mechanism is relevant when multiple requests share instructions or reference material. However, repeating text or maintaining a session does not guarantee reuse. The documentation explains that prefix matching and operational conditions affect cache hits. A project should therefore inspect usage records instead of inferring behavior solely from visually similar messages. The record should distinguish what the service reported from what the team expected. [Source: OpenAI](https://developers.openai.com/api/docs/guides/prompt-caching).

## Limited retention is not institutional memory

The same document states that cache entries are not kept indefinitely and that retention and behavior differ across models. A cache should not be treated as durable memory, a [document repository](/en/glossary/document-repository) or the official record of a decision. For an organizational application, preserve documents and necessary history through mechanisms intended for that purpose rather than depending on temporary reuse of processing.

Caching is also different from [batch processing](https://thecompanybrain.com.br/en/glossary/batch-processing): the former reuses eligible work, while the latter groups items for processing. Nor does caching replace the service's [rate limits](https://thecompanybrain.com.br/en/glossary/rate-limit). Check eligibility, retention and usage categories in the applicable documentation and available settings. Support for caching alone does not establish a guaranteed financial benefit.

## Hypothetical example

A team sends stable classification instructions followed by a different request on each call. It records the instruction version and checks whether the service reports prefix reuse. When a rule changes, the team does not assume that previous states remain eligible. Results and decisions are stored in the organization's system. Any processing reuse consequently remains an operational characteristic, while the record needed for the work stays explicitly available. The team can interpret the application without relying on the continued existence of a cache entry.

## Sources

- [Prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching): Description of prefix reuse and caching conditions that differ across models and service modes.

## Related reading

- [Cost per token](/en/glossary/cost-per-token)
- [Rate limit](/en/glossary/rate-limit)
- [Batch processing](/en/glossary/batch-processing)
- [AI system monitoring](/en/glossary/ai-system-monitoring)
- [Autoscaling](/en/glossary/autoscaling)
- [Latency](/en/glossary/latency)
