Which TWO practices prevent a cache stampede when a popular key expires?
- A Add a small random jitter to each key's TTL (correct answer)
- B Recompute the value behind a short-lived lock so only one caller rebuilds it (correct answer)
- C Set all TTLs to the same value for predictability
- D Disable eviction
- E Use the KEYS command to pre-warm
Shortcut: Identical TTLs cause many keys to expire together and every caller to rebuild at once. Jitter spreads the expiries, and a rebuild lock ensures a single caller recomputes while the others wait or serve stale. KEYS is O(N) and blocks the server, making the incident worse.