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
exports.multiCache = {
enable: true,
package: 'egg-multi-cache',
};
Configuration
exports.multiCache = {
};
see config/config.default.js for more detail.
Example
Questions & Suggestions
Please open an issue here.
License
MIT