Mongodb is adopted in the business system, and now I want to use redis for cache optimization for some data.
Originally saw a mongoose-redis-cache:https://github.com/conancat/mongoose-red …, I understand that it is equivalent to establishing a key-value pair of query statement and query result, but in this case, if the database business changes, it cannot be synchronized to the cache. Do you have any other plans?
Spring-data is good. There are mongodb and redis. It is convenient and quick to directly use spring-data-jpa to operate mongodb. Spring also has cached annotations cacheable, which can be automatically stored in the cache.