Cache Invalidation: Pushing Updates Versus Polling?
Balzhan Orazbayeva
·4915 views
hey ev1, im workin on a system where we need to keep a distributed cache fresh w data from a primary db. im weighin 2 main approaches for invalidation: pushin updates from the db to the cache as they happen (maybe via cdc or a message queue), vs havinn the cache periodically poll the db for changes. pushin seems more immediate but adds complexity. pollinn is simpler but risks stale data for longer. wat r ur thoughts and experiences w these trade-offs? wen hv u found 1 approach better than the other
41 comments