Menu

1 / 3

How to use Claude Code's prompt cache to stretch your weekly limit

DEV Community: productivity·Dinesh Rajendran·about 15 hours ago
#oOkhD4Uk
#devtoproductivity#devto#dev#cache#cold
Reading 0:00
15s threshold

I measured 10,000 of my own requests. Warm turns cost almost nothing; the first one after a break costs 12–80× more. Three rules keep you on the cheap side.

Key findings

When Claude Code's prompt cache expires, the first message back costs 12× to 80× a warm turn, depending on the model and whether the cache lasts 5 minutes or 1 hour.

In 10,000 of my own requests, cold reloads were about a fifth of the cost in sessions under 100k tokens and 60–66% above 600k.

Compact before a break, start fresh with a handoff after one, and let small sessions be.

I had a Claude Code session open for most of a day. It was a good one: 250k tokens of context, and the agent knew the codebase, the plan, and the three approaches we'd already thrown away. I went to lunch, came back, and typed one line: "ok, carry on."

That single line used more of my budget than the previous twenty messages put together.

Nothing was broken.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.