[FEATURE] Configurable prompt cache TTL via env var
Resolved 💬 2 comments Opened Jan 6, 2026 by firatsarlar Closed Jan 6, 2026
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Use case: Working with 20-30 file codebases where pauses between
interactions cause cache misses. 1-hour TTL would reduce re-cache costs.
Request: Add env var like CLAUDE_CODE_CACHE_TTL accepting "5m" or "1h"
(matching the API's cache_control.ttl options).
The API already supports this - just needs exposure in Claude Code.
Proposed Solution
Just expose the feature that API currently has.
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗