3 ms·
TIL the prompt cache lasts 1 hour. I thought it was reduced to 5 minutes.
by dpkirchner 2mo ago
TIL the prompt cache lasts 1 hour. I thought it was reduced to 5 minutes.
- moebrowne 2mo agoIt depends. If you have a Claude Code subscription then it defaults to an hour, if you use Claude via an API or third party then it defaults to 5 minutes. You can opt-in to the 1 hour TTL but it obviously costs more. > 5-minute cache write tokens are 1.25 times the base input tokens price > 1-hour cache write tokens are 2 times the base input tokens price https://code.claude.com/docs/en/prompt-caching#on-a-claude-subscription https://code.claude.com/docs/en/prompt-caching#on-a-claude-s... https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing https://platform.claude.com/docs/en/build-with-claude/prompt...
- swingboy 2mo agoI think it depends on your subscription? I just have the 20$ and the cache is only 5 minutes. I’ve got the timer in my status line via ccstatusline and unless it is wrong, it says 5 minutes.