Cache invalidation — การทำให้ข้อมูลที่ cache ไว้สอดคล้องกับแหล่งข้อมูลต้นทาง — เป็นที่รู้กันว่าเป็นหนึ่งในปัญหาที่ยากที่สุดในวงการคอมพิวเตอร์ ความท้าทายคือการรับประกันว่า cache ไม่ส่งมอบ ข้อมูลที่ล้าสมัย (stale) ขณะที่สมดุลระหว่างประสิทธิภาพ ความสอดคล้อง และความซับซ้อน มีหลายกลยุทธ์และกับดักที่ควรเข้าใจ
ปัญหาหลัก
When the source data changes, the cached copy becomes STALE.
→ Serve stale data? (fast but wrong) vs invalidate? (consistent but complex/slower)
→ "There are only two hard things in CS: cache invalidation and naming things."
The difficulty: knowing WHEN and WHAT to invalidate, across distributed systems,
without races, while keeping good cache hit rates.
