Hardest problem in caching: knowing what to delete after a SQL transaction commits. Event hooks, change data capture, or pragmatic versioned keys each trade complexity against staleness risk.

  • Publish domain events after commit; consumers evict or warm specific key sets.
  • For broad invalidation, rotate a global `schema_version` in the key prefix on deploy.
  • Document SLOs: some pages may be eventually consistent by design.

Teams mixing SQL and document stores often use the same event bus for both cache and search index updates.