Skip to content

relzhong/egg-multi-cache

Repository files navigation

egg-multi-cache

NPM version build status Test coverage David deps Known Vulnerabilities npm download

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.

License

MIT

About

Cache manager provided by node-cache-manager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published