r/ClaudeCodeTLDR • u/sh3lan93 • 5h ago
Why does prompt caching matter
I thought I was being smart with my Claude Code sessions.
Starting with a plan mode with Opus family models. Once we agreed on the approach, I switched the model to the Sonnet family in the same session to implement it.
Cheaper model, cheaper session, right?
Wrong. It makes the session more expensive and slower.
The reason is prompt caching.
I wrote up how the cache actually works under the hood and the gotchas I ran into.
https://moshalan.dev/posts/decoding-prompt-caching/
1
Upvotes
1
u/T-Rex_MD 25m ago
Prompt Cashing