Caches

Summary: Specialized data stores optimized for low-latency read access to frequently accessed data.

Sources: chapter1, chapter12

Last updated: 2026-04-18


Caching is a critical technique for improving system performance and reducing the load on primary databases.

Common Strategies

  • Cache-aside: The application checks the cache first; if the data is not present (a “cache miss”), it reads it from the database and updates the cache (source: chapter12).
  • Read-through / Write-through: The application interacts only with the cache, which manages its own synchronization with the database.

Challenges

  • Invalidation: Ensuring that the cache is updated or cleared when the underlying data in the database changes (source: chapter12).
  • Replication: If the cache is distributed, maintaining consistency between different cache nodes.

Tools

Popular open-source caching systems include Redis and Memcached.