Home / Companies / OpenRouter / Blog / Post Details
Content Deep Dive

The Cheapest Token Is a Cached One: Prompt Caching + Sticky Routing

Blog post from OpenRouter

Post Details
Company
Date Published
Author
OpenRouter
Word Count
2,478
Company Posts That Month
9
Language
English
Hacker News Points
-
Post removed?
No
Summary

Prompt caching and sticky routing are strategies designed to reduce the cost of token usage in multi-turn sessions by efficiently managing repeated prompt components. By caching the repeated parts of prompts, such as system instructions and tool definitions, agents avoid being billed multiple times for the same content across different turns. A cache read is significantly cheaper, costing between 0.1x and 0.5x of the normal input pricing, depending on the provider, while cache writes can be more expensive, particularly if not reused. Sticky routing ensures that follow-up requests are directed to the same provider holding the warm cache, maintaining cost efficiency. However, caching efficacy can be compromised if prompts are too short, caches expire, or requests shift to different providers; setting a stable session_id helps mitigate these issues by keeping subsequent requests on the same provider endpoint. The overall goal is to make agent loops more cost-effective by reducing the expenses associated with repeated content while ensuring that session consistency is maintained through sticky routing.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Loop engineering 2 106 50 33 -3%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.