⌨️ENABLE_PROMPT_CACHING_1H
Also known as ENABLE_PROMPT_CACHING_1H_BEDROCK
Set to 1, it keeps the prompt cache for an hour.
Think of it like
It is like you pay a bit more to keep your seat for an hour.
Example
Lucy reads code for 20 minutes between prompts. With the five-minute cache, each prompt paid for a fresh start. With the hour, it does not.
Why it matters
Long gaps between prompts are normal in real work. A longer cache can save a lot there.
Definition
Example code
bash
export ENABLE_PROMPT_CACHING_1H=1
claudeCommon mistake
Key takeaways
- 1One hour. Not five minutes.
- 2Costs more to write. Pays off on long gaps.
- 3TTL variables win. Over this one.