node-cache-manager features a built-in memory cache (using node-lru-cache), with the standard functions you'd expect in most caches: ` set(key, val, {ttl: ttl}) // * see note below wrap(key, function, {ttl: ttl}) get(key) del(key)
// * Note that depending on the underlying store, you may be able to pass the // ttl as the third param, like this: set(key, val, ttl) // ... or pass no ttl at all: set(key, val)`
$ npm i egg-multi-cache --save
// {app_root}/config/plugin.js
exports.multiCache = {
enable: true,
package: 'egg-multi-cache',
};
// {app_root}/config/config.default.js
exports.multiCache = {
};
see config/config.default.js for more detail.
Please open an issue here.