All Questions
Caching hard

Why is 'Delete-on-Write' (Invalidate) preferred over 'Update-on-Write' (Set) for maintaining cache consistency?

  1. A The overhead of performing a cache deletion is significantly lower than executing a full update command on the primary server thread.
  2. B The update operation is inherently idempotent across multiple regional nodes, ensuring that subsequent writes do not conflict with each other.
  3. C Deletes are safer against race conditions where convergent writes arriving out of order can leave stale data permanently stored in the cache.
  4. D Performing partial updates to a cached object consumes significantly more network bandwidth than simply invalidating the entire resource key.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions