A cached response must be invalidated when its underlying record changes. Which approach is most reliable?
- A Rely on TTL expiry alone
- B Explicitly DEL the cache key in the same code path that writes the record (correct answer)
- C Use Pub/Sub without subscribers
- D Reduce maxmemory
Shortcut: Write-through invalidation removes the stale entry deterministically at the moment of change. TTL alone leaves a stale window equal to the remaining TTL.