Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-07-02T00:18:04.000Z (over 3 years ago)
- Last Synced: 2024-10-03T22:24:50.916Z (2 months ago)
- Topics: memcache, think-adapter
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 12
- 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
[![Build Status](https://travis-ci.org/thinkjs/think-cache-memcache.svg?branch=master)](https://travis-ci.org/thinkjs/think-cache-memcache)
[![Coverage Status](https://coveralls.io/repos/github/thinkjs/think-cache-memcache/badge.svg?branch=master)](https://coveralls.io/github/thinkjs/think-cache-memcache?branch=master)
[![npm](https://img.shields.io/npm/v/think-cache-memcache.svg?style=flat-square)](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/