3 pages for claude_code_prompt_cache_ttl.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Track cost and usage
Claude Code CLI · in the page
agent-sdk/cost-tracking
…recedence over `ENABLE_PROMPT_CACHING_1H`: * Main conversation: the `CLAUDE_CODE_PROMPT_CACHE_TTL` [environment variable](/docs/en/env-vars.md), or the [`promptCacheTtl`](/docs/en/settings-reference#…
How Claude Code uses prompt caching
Claude Code CLI · in the page
prompt-caching
…cheTtl`](/docs/en/settings-reference#promptcachettl) setting, or the `CLAUDE_CODE_PROMPT_CACHE_TTL` [environment variable](/docs/en/env-vars.md) * **Everything else**: the [`subagentPromptCacheTtl`](/…
All settings
Claude Code CLI · in the page
settings-reference
…5M`](/docs/en/env-vars) takes precedence over everything else, then [`CLAUDE_CODE_PROMPT_CACHE_TTL`](/docs/en/env-vars), then this key, and last [`ENABLE_PROMPT_CACHING_1H`](/docs/en/env-vars) This e…