Prefix Stability Is Everything
Prompt caching hashes exact token prefixes from byte 0. Placing a changing ISO timestamp, user name, or random request ID near the top of your system prompt invalidates 100% of downstream cache blocks. Always order: (1) Static system rules, (2) Tool schemas, (3) Shared reference docs, (4) Dynamic user/session turn at the very bottom.
Mind Minimum Block Thresholds & TTL Windows
Anthropic and OpenAI require minimum cacheable prefix lengths (1,024+ tokens) and keep ephemeral caches warm for 5–60 minutes. Batching traffic per tenant or workspace keeps hit rates consistently above 75%.