Skip to content
BENIBIX Learn

FORCE_PROMPT_CACHING_5M

AI⌨️ Claude CodeConfiguration

Also known as FORCE_PROMPT_CACHING_5M=1

Set to 1, it makes the cache last five minutes, every time.

Think of it like

It is like a rule from the boss. It beats all the other notes.

Example

Emma's team works in quick turns, so the hour cache just costs more. She sets this for the whole team, and each session uses five minutes.

Why it matters

One line keeps a whole team off the costlier cache, whatever each person set.

Definition

FORCE_PROMPT_CACHING_5M set to 1 keeps every saved prompt at five minutes. It wins over the TTL variables, the one-hour switch and both cache settings. Use it to stop paying the higher price for the hour, all through a team.

Example code

bash
export FORCE_PROMPT_CACHING_5M=1
claude
Hold every cache to five minutes.
The force is first in line.

Common mistake

Setting it and then trying 1h in a TTL variable. The force wins, so nothing changes.

Key takeaways

  1. 1
    Five minutes. Always.
  2. 2
    Wins over all. TTL and settings.
  3. 3
    Cheaper writes. For quick work.