Cache-aside with Redis: the easy part is the lookup
Follow a cache hit and miss, then work through invalidation, stale data, and the race conditions hiding between them.
Design caching behavior around correctness, freshness, and failure.
Follow a cache hit and miss, then work through invalidation, stale data, and the race conditions hiding between them.
A TTL controls freshness over time. An eviction policy controls what happens under memory pressure. Your cache needs both decisions.