node-redis-mongo icon indicating copy to clipboard operation
node-redis-mongo copied to clipboard

exporting mongoose.Query.prototype.cache ;

Open chrisn-au opened this issue 4 years ago • 0 comments

Fantastic work thanks - A question and possibly due to my ignorance but to get this to work I needed to export the cache function

module.exports.cache = mongoose.Query.prototype.cache ;

and then require it in the calling module

const  clearKey  = require("./cache").clearKey;
const cache = require('./cache').cache

Is this correct ?

chrisn-au avatar Jun 29 '20 22:06 chrisn-au