Invalidasi cache — menjaga data yang di-cache tetap konsisten dengan sumber kebenaran — terkenal sebagai salah satu masalah tersulit dalam komputasi. Tantangannya adalah memastikan cache tidak melayani data stale sambil menyeimbangkan performa, konsistensi, dan kompleksitas. Beberapa strategi dan jebakan layak dipahami.
Masalah inti
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.
