Skip to content
BENIBIX Learn

ENABLE_PROMPT_CACHING_1H

AI⌨️ Claude CodeConfiguration

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

ENABLE_PROMPT_CACHING_1H set to 1 asks for a saved prompt to last one hour, not the usual five minutes. It is for API key and cloud users. Subscription users get the hour on the main chat by default. Writing to the one-hour cache costs more, so it pays off only if you come back within the hour.

Example code

bash
export ENABLE_PROMPT_CACHING_1H=1
claude
Keep the cache warm through long breaks.
This switch is third in line.

Common mistake

Turning it on for quick back-and-forth work. You then pay the higher write price for nothing.

Key takeaways

  1. 1
    One hour. Not five minutes.
  2. 2
    Costs more to write. Pays off on long gaps.
  3. 3
    TTL variables win. Over this one.

Compare