Prompt Cache 1h Ttl
---
id: prompt-cache-1h-ttl
source: watch:code.claude.com/docs/en/changelog
status: active
captured: 2026-04-17
tags: [cache, context-window, cost, high-priority, v2.1.108]
tested_in: []
incorporated_in: ['3.2.0']
---
# 1-hour prompt cache TTL — opt-in via `ENABLE_PROMPT_CACHING_1H`
## Observation
v2.1.108 introduced a 1-hour prompt cache TTL opt-in via the `ENABLE_PROMPT_CACHING_1H` env var. Default remains 5 minutes. This is a significant expansion for long-running sessions that previously paid cache-miss costs on the 5-min boundary.
## Why it matters for dotforge
`domain/context-window-optimization.md` documents the 5-minute TTL as foundational:
> The Anthropic prompt cache has a 5-minute TTL. Sleeping past 300 seconds means the next wake-up reads your full conversation context uncached...
This is no longer the only option. The 1h TTL changes the cache economics:
- Long-running `/loop` or `/schedule` work can now amortize cache across 60 min instead of 5
- ScheduleWakeup cadence heuristics (in the `workflow-automation.md` rule) assume 5-min boundary — become less relevant with 1h TTL
- Cost analysis of idle polls changes significantly
## Required update
Add to `domain/context-window-optimization.md`:when to use it
Community prompt sourced from the open-source GitHub repo luiseiman/dotforge (MIT). A "Prompt Cache 1h Ttl" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
roleplaycommunitygeneral
source
luiseiman/dotforge · MIT