https://github.com/thinkjs/think-cache-memcache
Memcache adapter for cache for ThinkJS 3.x
https://github.com/thinkjs/think-cache-memcache
memcache think-adapter
Last synced: 8 days ago
JSON representation
Memcache adapter for cache for ThinkJS 3.x
- Host: GitHub
- URL: https://github.com/thinkjs/think-cache-memcache
- Owner: thinkjs
- License: mit
- Created: 2017-04-01T09:09:44.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-07-02T00:18:04.000Z (almost 4 years ago)
- Last Synced: 2025-03-19T05:48:26.429Z (about 1 month ago)
- Topics: memcache, think-adapter
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- think-awesome - think-cache-memcache
README
# think-cache-memcache
[](https://travis-ci.org/thinkjs/think-cache-memcache)
[](https://coveralls.io/github/thinkjs/think-cache-memcache?branch=master)
[](https://www.npmjs.com/package/think-cache-memcache)Use memcache to cache data
## Install
```
npm install think-cache-memcache
```## How to Usage
edit config file `src/config/adapter.js`, add options:
```js
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/