You get ten requests. Nine customers type short questions. The tenth customer uploads a long document and requests a summary. Your dashboard turns green to indicate that nine of ten requests found something in the prompt cache. A second cache, with the same requests and memory budget, finds only one match. Which cache would you choose?
In deciding which cache to keep, it helps to understand why the dashboard turned green. If the request log treats any prefix reuse as a hit, the nine short questions win on request count. Count the tokens reused and the two caches tie. You can work out which cache skips more attention work with a pen and paper. Finding out how long the customer waits takes a timing measurement.
What the cache keeps
A prompt cache saves some of the work required to process a request and stores part of a language model’s state.…