What can be cached
What it is
An LLM system has four different caches, at four different points:
- Response cache: the whole answer to a request seen before.
- Semantic cache: the answer to a request similar to one seen before.
- Prompt cache: the provider's saved work for the unchanging start of a prompt.
- Embedding and retrieval caches: vectors and search results that would otherwise be recomputed.
Why it matters
They save different things.
- A response cache skips the model call entirely: no cost, no wait.
- A prompt cache still makes the call, but charges less and starts faster.
- Knowing which is which matters, because the first two can return a wrong answer and the last two cannot.
In the real world: A support platform uses all four: exact matches for common questions, the provider's prompt cache for its long instructions, and saved embeddings for its help-centre articles.
Visual example
CachesThe first two can serve a wrong answer; the last two cannot.
Saying 'I would add caching' without saying which kind. They have different savings and different risks, and the interviewer's next question will be about the risk of whichever one you meant.