# FORCE_PROMPT_CACHING_5M

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

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** FORCE_PROMPT_CACHING_5M=1

## Think of it like

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

## 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

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.

## Example code

```bash
export FORCE_PROMPT_CACHING_5M=1
claude
```

Hold every cache to five minutes.

## Why it matters

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

## Common mistake

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

## Three principles

- **Five minutes.** Always.
- **Wins over all.** TTL and settings.
- **Cheaper writes.** For quick work.

## Related terms

- [CLAUDE_CODE_PROMPT_CACHE_TTL](https://learn.benibix.com/term/ai/claude-code-prompt-cache-ttl-variable)
- [ENABLE_PROMPT_CACHING_1H](https://learn.benibix.com/term/ai/enable-prompt-caching-1h-variable)
- [DISABLE_PROMPT_CACHING](https://learn.benibix.com/term/ai/disable-prompt-caching-variable)

![The 5-minute force wins, then the TTL variables, then the 1-hour switch, then the default.](https://learn.benibix.com/diagrams/env-cache-ttl.svg)

---

Source: https://learn.benibix.com/term/ai/force-prompt-caching-5m-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
