All resources
Cost & Infra17 October 2026·5 min read

Caching and routing: two cheap ways to cut LLM latency and cost

Before negotiating prices, stop paying for the same work twice, and stop sending easy requests to expensive models.

Caching

  • Prompt caching — reuse long, stable prefixes such as instructions and reference text where your provider supports it.
  • Result caching — store answers to repeated, identical questions, with expiry tied to how fast the facts change.
  • Retrieval caching — cache embeddings and search results for popular queries.

Routing

Classify each request by difficulty and send routine ones to a smaller, faster model; escalate only when the first answer fails a check or confidence is low. Measure the share of traffic each tier handles and the quality on a shared test set.

Caching must respect permissions. A cached answer for one user must never be served to someone who isn't allowed to see it.

Related capability

This is what our AI-Optimized Cloud & CI/CD practice is built around.

See how it's scoped