Stack Bundle · Mid
Redis & Caching Pack
Cache strategies, Redis data structures, eviction, and cache-aside vs write-through.
Caching and Redis: patterns, invalidation, persistence, and the questions that come up.
- Questions
- 360
- Topics
- 20
- Pages
- 245pages
- 360 questions, every one with a model answer
- Cache strategy cheat sheet
- Redis data structures
- Eviction & persistence
- Thundering herd fixes
Get the Redis & Caching Pack — $9
One-off. Delivered as a PDF by email the moment payment clears.
Prices shown are a USD base. Your local-market price is calculated at checkout in your own currency, plus any local sales tax.
What is inside
20 chapters, in the order the interviews tend to ask them:
- Redis data structures and when to use each
- Cache aside, read through and write through
- Cache coherence and staleness
- Cache penetration and null caching
- Cache avalanche and expiry staggering
- Invalidation patterns and event driven invalidation
- TTL and expiry semantics
- Eviction policies and memory limits
- Memory efficiency and encoding
- Persistence, RDB and the append only file
- Replication and Sentinel
- Redis Cluster and hash slots
- Atomicity, transactions and pipelining
- Lua scripting and functions
- Distributed locks and their failure modes
- Pub sub messaging and its guarantees
- Streams, consumer groups and job queues
- Cache stampedes and hot keys
- Cache observability and debugging
- Clients, connection pools and failure handling
How the answers are built
Each chapter opens with the checklist the question is really testing. A few from this pack:
- A string is a byte array with an expiry, which makes it the right shape for a cached document and for counters through INCR.
- Cache aside means the application reads the cache first and loads from the source on a miss, which keeps the cache layer ignorant of the source.
- A cache is a lossy copy, so the only honest question is how stale a hit is allowed to be, expressed as a consistency window.
- Penetration is a request pattern, not a bug: keys that never existed bypass the cache by definition and go straight to the source.
- A synchronised set of TTLs means the keys created together expire together, which turns normal traffic into a source overload.
- Delete after write is the simplest correct pattern, and it is only correct if the delete cannot be reordered before the source write.
Questions this pack covers
- When does a plain string beat a hash for a cached value
- How does listpack encoding change the cost of a small hash
- How does cache aside differ from write through behaviour
- What does read through actually move into your library
- How long is a cache hit allowed to be out of date
- What consistency window should your cache TTL target
- How does a cache penetration attack look in real traffic
- What does caching a null result actually prevent
Each one is answered in full in the pack, with the reasoning written out rather than a bullet list.
About this pack
- How many questions?
- 360, spread across 20 topics, written out in full across 245 pages.
- Do the answers just list keywords?
- No. Each answer is written as prose, because that is what you have to reproduce when someone asks you the question.
- How do I get it?
- Pay once and the PDF arrives by email immediately, with a signed download link.
- Can I get it refunded?
- Yes, if it is not what you expected. See the refund policy.