1.1.0 • Published 6 years ago
egg-multi-cache v1.1.0
egg-multi-cache
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)`
Install
$ npm i egg-multi-cache --save
Usage
// {app_root}/config/plugin.js
exports.multiCache = {
enable: true,
package: 'egg-multi-cache',
};
Configuration
// {app_root}/config/config.default.js
exports.multiCache = {
};
see config/config.default.js for more detail.
Example
Questions & Suggestions
Please open an issue here.