Invalidación de caché — mantener los datos en caché consistentes con la fuente de verdad — es famosamente uno de los problemas más difíciles en la informática. El desafío es asegurar que los cachés no sirvan datos obsoletos mientras se equilibran el rendimiento, la consistencia y la complejidad. Hay varias estrategias y trampas que vale la pena entender.
El problema central
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.
