Skip to content
Redis adapter for cache
JavaScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test null to void 0 Sep 13, 2017
.eslintrc eslint-think Jul 14, 2017
.gitignore init commit Mar 24, 2017
.travis.yml update .travis.yml Mar 24, 2017
LICENSE init commit Mar 24, 2017
README.md 修复示例代码缺少逗号问题 (#1) Jan 30, 2019
index.js Update index.js Sep 13, 2017
package.json 1.2.0 Jan 18, 2018

README.md

think-cache-redis

Build Status Coverage Status npm

Use redis to cache data

Install

npm install think-cache-redis

How to Usage

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

const redisCache = require('think-cache-redis');
exports.cache = {
  type: 'redis',
  common: {
    timeout: 24 * 3600 * 1000 // millisecond
  },
  redis: {
    handle: redisCache,
    port: 6379,
    host: '127.0.0.1',
    password: ''
  }
}

redis config see at https://github.com/luin/ioredis/blob/master/lib/redis.js

You can’t perform that action at this time.