Interview practice question
Stale value written back after invalidation
System Design · Caching · Experienced
Your logs show that sometimes, right after a product update, the cache holds the old price again. You do delete the key on update. Explain why and fix it.
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Read-miss race with concurrent write.
- Old DB value written after delete.
- Delayed second delete.
- Versioned set (compare-and-set).
- Leases or CDC-based invalidation.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.