Skip to content
Caches Database querys the easy way. This module is currently not developed. Nevertheless, I will apply patches.
Find file
Latest commit b27bcda @Gottox v0.1.4
Failed to load latest commit information.
lib stupidity fix
LICENSE initial checkin initial checkin
index.js initial checkin
package.json v0.1.4

Flattr this git repo


Monkey patches Mongoose.Query to support in-memory caching.


Monkey-Patching mongoose:

var mongoose = require('./mongoose')
var cacheOpts = {
require('mongoose-cache').install(mongoose, cacheOpts)

This means "cache up to 50 querys with a livetime of two minutes". See for all available options.

For enabling this cache in your query just call .cache()

db.User.find({ ... }).cache().exec(function() { ... })

For more talky output add debug: true to the cacheOpts.

Something went wrong with that request. Please try again.