A teammate randomized system prompts per user and expects the prompt cache to still help, what's wrong?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Click any words you think contain an error. Click again to unmark.
Prompt caches are exact-prefix matchers keyed on the literal leading token bytes; a six-token salt at position zero invalidates the entire cached prefix and there is no semantic fallback, so the expected ~90% hit
Imagine a library that gives you a discount when you ask for a book whose title starts exactly the way other people's titles start. The librarian checks the first letter, then the second, then the third, and so on, until the letters stop matching. If the very first letter is your initial, nobody else's title will ever match yours past letter one. That is what putting a per-user salt at the start of a prompt does to the cache. The librarian never even gets to read the long identical part that follows, because they gave up on letter one. The fix is to keep your initial out of the title and write it on a sticker at the end, where the matching has already finished.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: name exact-prefix matching, walk the trie lookup, debunk the semantic-similarity claim, and prescribe moving per-user data after the cache breakpoint.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Assuming prompt caching matches prompts by meaning or 'mostly equal' content. It does not. The lookup is a byte-exact prefix comparison from position zero, and a single different leading token invalidates the whole prefix.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.