Skip to content

thinkjs/think-cache-memcache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/