mongoose-cache
Monkey patches Mongoose.Query to support in-memory caching.
usage
Monkey-Patching mongoose:
var mongoose = var cacheOpts = max:50 maxAge:1000*60*2;
This means "cache up to 50 querys with a livetime of two minutes". See https://github.com/isaacs/node-lru-cache#options for all available options.
For enabling this cache in your query just call .cache()
dbUser
For more talky output add debug: true
to the cacheOpts.