项目作者: thinkjs

项目描述 :
Redis adapter for cache for ThinkJS 3.x
高级语言: JavaScript
项目地址: git://github.com/thinkjs/think-cache-redis.git
创建时间: 2017-03-24T02:50:18Z
项目社区:https://github.com/thinkjs/think-cache-redis

开源协议:MIT License

下载


think-cache-redis

Build Status
Coverage Status
npm

Use redis to cache data

Install

  1. npm install think-cache-redis

How to Usage

edit config file src/config/adapter.js, add options:

  1. const redisCache = require('think-cache-redis');
  2. exports.cache = {
  3. type: 'redis',
  4. common: {
  5. timeout: 24 * 3600 * 1000 // millisecond
  6. },
  7. redis: {
  8. handle: redisCache,
  9. port: 6379,
  10. host: '127.0.0.1',
  11. password: ''
  12. }
  13. }

redis config see at https://github.com/luin/ioredis/