Cache
Storage for frequently used data to provide quick access. Instead of recalculating or requesting the result again, it is retrieved from the cache.
Where in AI
- response cache — identical requests do not go to the model again;
- KV-cache — intermediate attention calculations;
- browser cache — website static content.
Pros and Cons
- Pros: faster and cheaper.
- Cons: outdated data — the cache needs to be invalidated.