ReviseAlgo Logo

Chapter I: Networking & Web Fundamentals

Caching

Storing a subset of data in fast memory to speed up retrieval and reduce load.

In short

A cache stores a subset of data in fast memory so repeated reads avoid the slower underlying store.

Loading diagram…

Key takeaways

  • Write-through = consistent; write-back = fast but risky.
  • LRU and LFU are the most common eviction policies.
  • Never use a cache as a permanent, durable store.