{"name":"FORCE_PROMPT_CACHING_5M","slug":"force-prompt-caching-5m","family":"env","title":"Environment variables","noun":"environment variable","description":"You can pin the prompt cache to five minutes or an hour, separately for subagents.","description_source":"entry","described_by":{"version":"2.1.242","anchor":"prompt-cache-lifetime-is-now-configurable"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.309","builds":150,"mined_builds":150,"first_cited":null},"aliases":[],"entries":[{"version":"2.1.300","anchor":"new-env-var-claude-code-messages-prompt-cache-ttl-forces-the","heading":"Main-conversation prompt caching can be forced to five minutes","line":"Setting `CLAUDE_CODE_MESSAGES_PROMPT_CACHE_TTL` to `5m` makes the main conversation's prompt cache last 5 minutes instead of the usual length","released_at":"2026-10-14 14:27:26","reason":"found in this entry's text"},{"version":"2.1.242","anchor":"prompt-cache-lifetime-is-now-configurable","heading":"Prompt cache lifetime is now configurable","line":"You can pin the prompt cache to five minutes or an hour, separately for subagents.","released_at":"2026-08-24 19:16:14","reason":"found in this entry's text"}],"entries_total":2,"docs":[{"source":"claude-code","path":"prompt-caching","title":"How Claude Code uses prompt caching","documented":false},{"source":"claude-code","path":"settings-reference","title":"All settings","documented":false}],"docs_total":2,"gates":[],"related":[{"name":"FORCE_AUTOUPDATE_PLUGINS","slug":"force-autoupdate-plugins","description":"With `CLAUDE_CODE_AUTOUPDATER_DISABLED_BY_HOST`, plugin auto-updates turn off when the host disables updates or pins the version"},{"name":"FORCE_CODE_TERMINAL","slug":"force-code-terminal","description":"Any non-empty value makes Claude Code treat its terminal as a supported IDE terminal, as it does when it detects a VS Code-family or JetBrains integrated terminal; IDE integration checks such as IDE auto-connect and the IDE extension install prompt read this result. It is also in the list of variables Claude Code removes from the environment of some processes it spawns."},{"name":"FORCE_COLOR","slug":"force-color","description":"Small polish: credit labels, an extra help link, bigger artifact fetch limit, safer MCP environment handling."},{"name":"FORCE_VCR","slug":"force-vcr","description":null}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/force-prompt-caching-5m","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}