node-cache
node cache provider using redis, memcache, lru, mysql, file
Install
npm i node-caches --save
you need to install some dependencies for provider.
- Mysql
npm i sequelize mysql2 --save
- Memcache
npm i memcache-plus sequelize mysql2 --save
- File
npm i cacache --save
- Redis
npm i ioredis --save
- LRU
npm i lru-cache --save
- Mongodb
npm i mongoose --save
Setup
mysql
mysql =
options
parameters will be passed to http://docs.sequelizejs.com/class/lib/sequelize.js~Sequelize.html#instance-constructor-constructor
memcache
mem =
options
parameters will be passed to https://github.com/victorquinn/memcache-plus/blob/master/docs/initialization.md#options
options.mysql
parameters will be passed to http://docs.sequelizejs.com/class/lib/sequelize.js~Sequelize.html#instance-constructor-constructor
file
file =
redis
redis =
options
parameters will be passed to https://github.com/luin/ioredis/blob/master/API.md#new_Redis_new
lru
lru =
options
parameters will be passed to https://github.com/isaacs/node-lru-cache#options
mongodb
mongodb =
implements ICache API
Also see the API Documentation
LICENSE
Copyright (c) Terry Cai. Licensed under the MIT license.