<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-hidden-cache-you-re-paying-for-but-not-using-0w5qklioj" -->

---
title: The Hidden Cache You’re Paying For But Not Using | daily.dev
description: Prompt caching stores the computed key/value attention state for a prefix of your input and bills re-reads at roughly one-tenth the normal input price. Agent...
canonical: https://daily.dev/posts/the-hidden-cache-you-re-paying-for-but-not-using-0w5qklioj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The Hidden Cache You’re Paying For But Not Using | daily.dev
og:description: Prompt caching stores the computed key/value attention state for a prefix of your input and bills re-reads at roughly one-tenth the normal input price. Agent...
og:url: https://daily.dev/posts/the-hidden-cache-you-re-paying-for-but-not-using-0w5qklioj
og:image: https://api.daily.dev/og/posts/0W5qKlIoJ.png
og:image:alt: The Hidden Cache You’re Paying For But Not Using
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The Hidden Cache You’re Paying For But Not Using

**[Medium](https://daily.dev/sources/medium_js)** · 16 min read · 0 upvotes · 0 comments

## Summary

Prompt caching stores the computed key/value attention state for a prefix of your input and bills re-reads at roughly one-tenth the normal input price. Agent loops are the ideal workload because they re-send a growing transcript every turn, making costs quadratic without caching. The correct pattern uses two cache_control breakpoints: one static on tools + system, one rolling on the last message. Anthropic requires explicit breakpoints while OpenRouter caches OpenAI/DeepSeek/Gemini automatically but still requires explicit markers for Anthropic-backed routes. The failure mode is silent — a plain string in the system field or a client that only reads prompt_tokens means you pay full price while believing you're optimized. A worked cost model shows a ~78% reduction in input costs for a 12-turn agent run. Key observability advice: instrument cache_read_input_tokens, keep your prefix byte-stable, and verify the number increases on turn two.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@sdemian/the-hidden-cache-youre-paying-for-but-not-using-387d81c8b621>

## Similar posts on daily.dev

- [Monitor prompt caching to optimize your token usage](https://daily.dev/posts/monitor-prompt-caching-to-optimize-your-token-usage-bwzwycrgn) · Datadog · 0 upvotes · 0 comments
- [Prompt Caching for Anthropic and OpenAI Models: Building Cost-Efficient AI Systems](https://daily.dev/posts/prompt-caching-for-anthropic-and-openai-models-building-cost-efficient-ai-systems-mjzh92xkq) · DigitalOcean · 2 upvotes · 0 comments
- [Prompt Caching Explained](https://daily.dev/posts/prompt-caching-explained-mhomvre8o) · DigitalOcean Community · 2 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#anthropic](https://daily.dev/tags/anthropic)

[View this post on daily.dev](https://daily.dev/posts/the-hidden-cache-you-re-paying-for-but-not-using-0w5qklioj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The Hidden Cache You’re Paying For But Not Using","url":"https://daily.dev/posts/the-hidden-cache-you-re-paying-for-but-not-using-0w5qklioj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-hidden-cache-you-re-paying-for-but-not-using-0w5qklioj"},"datePublished":"2026-07-22T00:50:47.128Z","dateModified":"2026-07-22T00:53:09.806Z","description":"Prompt caching stores the computed key/value attention state for a prefix of your input and bills re-reads at roughly one-tenth the normal input price. Agent...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/the-hidden-cache-you-re-paying-for-but-not-using-0w5qklioj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,anthropic","timeRequired":"PT16M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"The Hidden Cache You’re Paying For But Not Using"}]}
```

