Storage, Redis & Caching
Caching: the cache-aside pattern
How 36 milliseconds of database work per page view turns into one fill per product every five minutes, and the write order that stops the cache from serving old prices.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Storage, Redis & Caching
- Point-in-time recoveryBeginner · 5 min
Point-in-time recovery replays WAL from a backup to a target moment.
- Replication slotBeginner · 4 min
Replication slot retains WAL until consumed by a subscriber.
- Redis expirationBeginner · 4 min
Redis expiration removes keys after a TTL.
- Redis sorted setBeginner · 4 min
Redis sorted set stores scored members in rank order.
- Block versus object storageBeginner · 4 min
Explain how block storage and object storage differ in the kind of request they take, and choose the right one for a database versus a backup set.
- Filesystem durabilityIntermediate · 4 min
Explain why a successful write can still be lost in a crash, and how fsync and the rename pattern decide whether saved data survives a power cut.