think-cache-redis-cluster

1.0.8 • Public • Published

think-cache-redis

Build Status Coverage Status npm

Use redis to cache data

Install

npm install think-cache-redis-cluster

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

/think-cache-redis-cluster/

    Package Sidebar

    Install

    npm i think-cache-redis-cluster

    Weekly Downloads

    1

    Version

    1.0.8

    License

    ISC

    Unpacked Size

    6.12 kB

    Total Files

    7

    Last publish

    Collaborators

    • feeloc