egg-multi-cache

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i egg-multi-cache

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

10.6 kB

Total Files

9

Last publish

Collaborators

  • relzhong