# Adding sticky caching to improve cost and speed

> Repeated instructions can cost less and process faster when an AI provider can reuse earlier work. Cache affinity helps preserve that opportunity after a provider change, while keeping your routing safeguards in place.

- Published: 2026-09-10
- Author: Flavien Berwick
- Category: Product
- Web page: https://carouter.ai/blog/cache-affinity
- In French: https://carouter.ai/fr/blog/cache-affinity.md

![Adding sticky caching to conversations: one model, two sovereign providers, four requests. The third request stays on the provider holding the warm cache instead of going straight back to the catalog's first choice; later, the catalog's order returns.](https://carouter.ai/blog/cache-affinity/illustration.png)

An AI assistant often receives the same instructions and conversation history with each new question. Processing that repeated material takes time and can add to the bill. Prompt caching lets a provider temporarily reuse work it has already done, which can mean faster responses and lower input costs.

CARouter’s cache affinity is designed to help retain that benefit when a request has to move to another provider. It gives the provider that last answered a preference for subsequent requests using the same API key and model. Activation depends on verifying each provider’s published cache lifetime.

## Why a provider change matters

Imagine a customer service assistant handling a conversation. Its usual provider is busy, so CARouter sends the next request to another approved provider running the same model. That provider processes the conversation and may cache the repeated material for later use.

Without cache affinity, the next request can return to the original provider as soon as it is available. The work just done at the replacement provider cannot be reused there. Staying with the provider that just answered gives the next request a chance to benefit from its cache.

## Your routing safeguards still come first

- Residency and reliability: the preference cannot move a foreign provider ahead of a sovereign one, override your provider permissions or border controls, or put a degraded provider ahead of a healthy one in the same residency tier.
- Cost control: if your API key prioritizes cost, the lowest listed price still comes first. Cache affinity only breaks a tie between equally priced offers.
- Limited routing memory: this feature remembers which provider last answered for an API key and model. It does not store, copy or fingerprint your prompt. The provider manages its own cache.
- Temporary preference: each successful request renews the preference for the provider’s verified cache lifetime. Once it expires, normal routing resumes. If the preference cannot be read, normal routing also applies.

## What to expect

The opportunity is greatest for repeated instructions and ongoing conversations. Savings and faster responses are possible, not guaranteed: the provider must support caching, recognize reusable content and still have it available. CARouter does not create a cache or transfer one between providers.

Where a provider reports cached input usage and has a published cached rate, that rate is used in the request charge. The documentation shows cached input prices where available, so your team can assess the potential benefit.

Cache affinity is enabled only for providers whose cache lifetime has been verified. Until a provider has that verification, requests follow the existing routing rules.

[Compare available models and prices.](https://carouter.ai/docs) [Read the technical routing rules.](https://carouter.ai/llms-full.txt)

---

More articles: [CARouter Blog](https://carouter.ai/blog.md). What CARouter is and how to call it: [llms.txt](https://carouter.ai/llms.txt).
