Prompt Caching
2 articles
-
OpenAIOpenAI's 12-Hour Cache Can Make You Pay Twice
On 20 October OpenAI added a 12-hour minimum prompt-cache lifetime to the Responses API at 2.5x the input price per write, against 1.25x for the default 30 minutes, with reads priced the same under both. Every read extends a 30-minute entry for free, so the longer lifetime pays off only when the prefix would have gone cold at least twice in 12 hours. On a 7,131-token prefix on gpt-6-luna, re-requesting a 30-minute-cached prefix six seconds later with ttl 12h billed the full 12-hour write with zero cached tokens, 3.75x in total, as the guide documents. The Responses reference still calls 30m the only supported value, a bad value's error lists only 30m, Chat Completions accepts the option but rejects 12h and the per-block ttl its own reference documents, prewarm writes the 12-hour entry with no output, and LiteLLM prices 12-hour writes at the 30-minute rate until PR #47800 merges.
-
Claude CodeClaude Code Compacts Idle Chats, and Has Since September
On 14 October the Claude Code 2.1.299 changelog documented idle compaction: a 200K+ token terminal conversation left idle for about 54 minutes is summarized before its one-hour prompt cache expires. The behavior had been live since 2.1.286 on 30 September through a server-side flag, the idleCompaction opt-out shipped in 2.1.290 on 5 October without a changelog line and was documented by a user reading the binary, and the /config row came in 2.1.302 on 16 October. At Opus 5.5 list prices it trades a $1.60 cold rebuild of a 200,000-token prefix for a $0.04 cache read and a roughly $0.40 summary, runs only on the one-hour TTL that subscribers get within plan usage, summarizes away path-scoped rules, nested CLAUDE.md files and hook-injected context, and records itself as trigger auto, so a PreCompact hook can only tell it from a context-limit compaction by checking the transcript's age.