$ cat ./ai-news/50717029.md · 2026-12-01

Claude's 5-minute prompt cache vs OpenAI's 30-minute cache: what pauses cost

Anthropic's default prompt cache lasts 5 minutes and OpenAI's about 30. Idle gaps between AI requests can quietly raise your bill. Here is how to plan for them.

source
requesty.ai ↗
discussion
Hacker News · 276 pts ↗
written by
DevFlexCo · AI-assisted analysis
tl;dr
  • Log cache read and write token counts for one real workflow before changing anything.
  • Keep fixed instructions and tool definitions at the start of prompts to make cache hits possible.
  • Verify cache durations and prices on the provider's current documentation before building a cost model.

What happened

A Requesty blog post compares how long prompt caches last on Claude and OpenAI models. The headline says Claude's default cache lasts 5 minutes and OpenAI's lasts 30. We only had the title, the link, and Hacker News discussion excerpts, so we could not verify the article's full figures or pricing tables.

Commenters made several claims that should be checked before anyone relies on them. One said Anthropic offers a one-hour cache at twice the cost of the five-minute tier. Another said OpenAI offers a 12-hour cache at 2.5 times the cost of the 30-minute one. A third asked where cache durations are published at all, which suggests the details are not easy to find. Treat all of these as unconfirmed until you check the providers' current pricing and documentation.

Why it matters

Prompt caching lets a provider reuse work it has already done on the front part of a long prompt, such as system instructions, tool definitions, or earlier conversation turns. A cache hit is far cheaper than reprocessing that context. If the gap between your requests is longer than the cache window, the next request pays for the full context again.

This matters most for tools that carry long context across many turns, such as coding agents and chat assistants. A pause to review output or step away can change the cost of a session. One commenter summarized it bluntly: a cache hit is cheap and a miss is expensive. Another argued that the effect is real but only significant for certain workflows, not every user. That disagreement is useful. The size of the impact depends on your own usage pattern, and no single benchmark settles it.

Cache windows and prices can change, so any cost model built on them needs a review date.

What founders and small businesses should do

  1. Measure before you optimize. If your provider's API reports cache read and write token counts, log them per request for one real workflow. Find out how often you actually miss the cache.
  2. Match the cache tier to your rhythm. If your team works in bursts with long pauses, compare the extra cost of a longer cache tier against the misses you measured. Do the arithmetic rather than assuming.
  3. Keep prompt prefixes stable. Put fixed instructions and tool definitions first and variable content last, so repeated requests can reuse the cached portion.
  4. Design for resumption. Save compact session state, such as decisions, summaries, and file references, so a new session starts small instead of replaying a long history.
  5. Test cheaper models on your own tasks. Commenters pointed to lower-cost alternatives. Price is only useful if output quality holds for your use case, so run your real prompts before switching.
  6. Isolate agents. One commenter suggested running agents in a sandboxed environment with their own branch per session. That is mainly a safety and context-hygiene practice, not a cache fix, but it reduces the cost of starting over.

Local models came up as well, including the idea of saving a model's key-value cache to disk to resume sessions faster. That can reduce reprocessing, but it trades API fees for hardware, maintenance, and quality tradeoffs.

The DevFlexCo take

A small team can start simply. Pick one AI workflow, log its cache behavior for a representative stretch of real use, and then decide whether to change session timeouts, prompt structure, or the cache tier. Most of the gain comes from understanding your own gaps, not from chasing the lowest headline price. At DevFlexCo we build AI products and SEO-first launches, and we track this kind of cost behavior when we design AI features so a customer-facing app does not produce a surprise bill for its owner.

$ devflexco book --discovery-call

Have an idea or a project in mind? Book a free discovery call — we'll scope it with you and show you how to launch it with AI and win your first customers from search.

← back to ai-news