Say I have some documents in MongoDB and have cached a couple of fields in redis. If I were to update some value in both the DB and cache, I would like either both of them to succeed or both of them to fail. How is this problem generally handled?
If both the updates were to happen within MongoDB, I would use transactions. But, I presume that is not possible across two systems like MongoDB & redis.