re: How is usually consistency maintained between DB and cache? VIEW POST


I think you can do it on the application level if you want. You can start a transaction of MongoDB in a session, and update data inside mongo, in the same context, update the redis cache too. If that's successful, commit the transaction, else rollback.

Code of Conduct Report abuse