Caching Patterns, Eviction & Redis/Memcached
Why and where to cache, read/write patterns, eviction policies (with an LRU implementation), Redis data structures, persistence and Cluster, Memcached, and multi-level caches.
About 85 minutes · 15 exam questions · 8 interview questions · 2 code labs
What you will learn
- Why cache: latency, load and the hit-ratio math
- Where to cache: the layers
- Read patterns: cache-aside and read-through
- Write patterns: write-through, write-back, write-around
- Eviction policies and an O(1) LRU implementation
- Redis: data structures, threading and persistence
- Redis Cluster, replication and hash tags
- Redis vs Memcached
- Local vs distributed vs multi-level (L1/L2) caches and serialization cost
- Scenario: “The database is getting slow — introduce caching”