
follow-up: anthropic quietly switched the default cache TTL from 1 hour to 5 minutes on april 2. here's the data.
Key Points
- 1An analysis of Claude Code usage revealed Anthropic silently switched its ephemeral cache Time-To-Live (TTL) from one hour to five minutes on April 2nd, without any official announcement.
- 2This unannounced change led to a 5.1x increase in cache busts for the user, resulting in a significant projected monthly cost increase and a rise in "redundant reads" as Claude frequently re-establishes context.
- 3To mitigate these impacts, the author developed monitoring hooks and advises users to disable the 1M token context (capping it at 200k) to reduce the cost of context rebuilds caused by the more frequent cache expirations.
The paper reports a significant, unannounced change in the cache Time-To-Live (TTL) for Claude Code, transitioning from a 1-hour (1h) cache tier to a 5-minute (5m) cache tier. This change occurred between 06:23 and 06:55 UTC on April 2, identified through an analysis of internal log data.
The core methodology involved querying a conversations.db database across 1,140 user sessions. For each turn within a session, the system logs which cache tier was utilized: ephemeral_1h_input_tokens or ephemeral_5m_input_tokens. The author analyzed the temporal distribution of non-zero values for these fields, observing a clear crossover. From March 1 to April 1, 100% of turns utilized the ephemeral_1h tier. April 2 showed a mixed distribution, with 491 turns on the 5m tier and 644 turns on the 1h tier. From April 3 onwards, 100% of turns used the ephemeral_5m tier. This data-driven approach allowed for precise identification of the unannounced service modification.
The impact of this change is quantified and detailed:
- Cache Bust Frequency: Increased by a factor of approximately , from busts per day pre-change to busts per day post-change.
- Cost Increase: Daily cost associated with cache busts rose from \6.28\$15.54\$277.8015.54/6.28 \approx 2.47$) is lower than the frequency multiplier because the 1h-tier cache writes incurred a higher cost per token.
- User Experience and Mental Models: The change explains why users had differing understandings of the cache TTL, depending on when they started using the service. Documentation still indicates "up to 1 hour."
- Secondary Impacts:
- Redundant Reads: A significant increase in redundant reads (the same file read three or more times in a single session) was observed, attributed to the shorter TTL causing Claude to re-read files to re-establish context as cache expires. This padding of conversation history makes subsequent cache rebuilds more expensive.
- Backgrounded Tasks/Long Tool Calls: Tasks that background execution (e.g., long tool calls, agents,
/loopor/schedulecommands exceeding 5 minutes) now almost guarantee a cache bust upon return. The system pays full input price to rebuild context that was present before the task started, compounding costs for operations expected to take longer.
To mitigate these issues, the author developed and implemented specific solutions and recommendations:
- Monitoring Tools: Dashboard charts were added to visualize cache bust frequency and cost over time, distinguishing between the 1h and 5m tiers, and comparing pre- and post-change metrics.
- Custom Hooks: Three Python/shell scripts are provided as hooks for the Claude Code environment:
plugins/claude-memory/hooks/cache-warn-stop.py: Triggers a warning upon session stop if cache busts are detected.plugins/claude-memory/hooks/cache-expiry-warn.py: Notifies the user about impending cache expiry.plugins/claude-memory/hooks/cache-warn-3min.sh: A background timer to warn about cache nearing expiry.
/get-token-insights skill from the claude-memory plugin within the Claudest repository.
- Configuration Adjustments:
- Context Cap: Setting
"CLAUDE_CODE_DISABLE_1M_CONTEXT": "1"in~/.claude/settings.jsoncaps the context window at 200k tokens instead of 1M. This significantly reduces the cost of rebuilding context after a cache bust, as a 200k context rebuild is five times cheaper than a 1M rebuild. "showClearContextOnPlanAccept": true: An optional setting for users of plan mode to manage context across sessions.
- Context Cap: Setting