60 ways to spend fewer tokens
The 22 Beginner tips are free to read. The 38 advanced tactics unlock with Pro — plus a fresh tip in your inbox every morning.
Freeze the Prefix: One Stray Timestamp Kills Your Whole Cache
Prompt caching is a prefix match. A single dynamic byte near the top of your prompt silently invalidates everything after it, so you pay full price every call without realizing it.
Share One Cached System Prompt Across All Your Users
A single per-user byte (name, ID, locale) in the system prompt forks the cache into one entry per user. Strip personalization out of the prefix so every user reads the same cached block.
Cache Your Tool Definitions, Not Just the System Prompt
Tool schemas render before the system prompt, so a non-deterministic tool list silently blocks the cache for everything after it. Sort and freeze the tool array to make tools cacheable.
Know Your Minimum: Short Prompts Silently Refuse to Cache
Below a model-specific token floor, a cache_control marker does nothing — no error, just a full-price bill. Know the floor before you rely on caching.
Order Your Prompt by Volatility: Tools, then System, then the Question
The model renders tools, then system, then messages. Put your most stable content first and your most volatile content last, or your breakpoints cache nothing reusable.
Match TTL to Traffic, and Pre-Warm Before the First User Hits
The default 5-minute cache evaporates between bursts. Choose 5-minute vs 1-hour TTL by your traffic gaps, and pre-warm at startup to kill first-request latency.
Read the Usage Block to Prove Your Cache Actually Hits
A cache_control marker that silently never hits looks identical to one that works — until you read the three usage token fields and compute your real hit rate.
Like what you see?
Get a fresh one in your inbox — weekly free, daily on Pro.