Three Rules of KV Cache Friendliness
Three practical takeaways from the KV Cache mechanism:
- system prompt and tool definitions, once fixed, must not be changed – even a space invalidates the entire cache;
- dynamic information (time, state) should always be added to the end of the context in a new message;
- standard API format – do not manually concatenate messages.
Analogy with cooking: if the first steps are the same – we continue from the same place; one step changed – everything from scratch.
Related: KV Cache, Prompt Cache, Agent State String