Cache invalidation — cached data کو source of truth کے ساتھ مطابقت میں رکھنا — کمپیوٹنگ میں مشہور طور پر سب سے مشکل مسائل میں سے ایک ہے۔ چیلنج یہ یقینی بنانا ہے کہ caches stale data فراہم نہ کریں جبکہ کارکردگی، مطابقت، اور پیچیدگی میں توازن برقرار رہے۔ کئی حکمت عملی اور خطرات سمجھنے قابلِ قدر ہیں۔
The core problem
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.
