3 ms·
Not only that but your database and app are working under the assumption of Read Committed or better and now by introducing a cache that is out of band from you
by rubiquity 5y ago
Not only that but your database and app are working under the assumption of Read Committed or better and now by introducing a cache that is out of band from your database transactions you’re introducing a whole slew of consistency bugs (that often go undetected).
- lf-non 5y agoI may be missing the point here, but isn't it common to address this through a combination of timestamped keys[1] and interleaving database and redis transactions (start redis transaction, start db transaction, update db and add cache operations to current trx, and finally commit db trx and if it succeeds commit the redis trx, otherwise rollback the redis trx.) [1] https://blogcabin.37signals.com/posts/3113-how-key-based-cache-expiration-works https://blogcabin.37signals.com/posts/3113-how-key-based-cac...