Home

Awesome

think-cache-memcache

Build Status Coverage Status npm

Use memcache to cache data

Install

npm install think-cache-memcache

How to Usage

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

const memcacheCache = require('think-cache-memcache');
exports.cache = {
  type: 'memcache',
  common: {
    timeout: 24 * 3600 * 1000 // millisecond, default timeout for function set
  },
  memcache: {
    handle: memcacheCache,
    hosts: ['127.0.0.1:11211'],
    maxValueSize: 1048576,
    netTimeout: 5000,
    reconnect: true
  }
}

memcache config see at http://memcache-plus.com/