Mongoose (or similar ODM) in-memory record registry? Mongoose (or similar ODM) in-memory record registry? mongodb mongodb

Mongoose (or similar ODM) in-memory record registry?


RedisI would suggest to take a look at Redis if you have not considered it already, You can use Redis to save records after they are saved in MongoDB and retrieve from Redis if available, if not query MongoDB and save to redis again.

Or may be use Cassandra for both purpose ?


As Vipin Dubey suggested, you can cache your queries using Redis. It is an in-memory data store that is commonly used for caching purposes.

I recommend the cachegoose module. It nicely integrates the Mongoose caching concept by storing MongoDB queries (the ones you want), and getting them from the cache when the same query is ran. Thus, you will have less calls to your database.

Redis also has various interfaces for visualizing your current values. I personally recommend Redsmin because it provides a cross-platform web interface with an awesome editor.