https://github.com/thinkjs/think-cache-redis
Redis adapter for cache for ThinkJS 3.x
https://github.com/thinkjs/think-cache-redis
cache redis think-adapter thinkjs3
Last synced: 12 days ago
JSON representation
Redis adapter for cache for ThinkJS 3.x
- Host: GitHub
- URL: https://github.com/thinkjs/think-cache-redis
- Owner: thinkjs
- License: mit
- Created: 2017-03-24T02:50:18.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-07-02T00:01:38.000Z (almost 4 years ago)
- Last Synced: 2025-03-22T04:01:54.573Z (28 days ago)
- Topics: cache, redis, think-adapter, thinkjs3
- Language: JavaScript
- Homepage:
- Size: 23.4 KB
- Stars: 5
- Watchers: 9
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- think-awesome - think-cache-redis
README
# think-cache-redis
[](https://travis-ci.org/thinkjs/think-cache-redis)
[](https://coveralls.io/github/thinkjs/think-cache-redis?branch=master)
[](https://www.npmjs.com/package/think-cache-redis)Use redis to cache data
## Install
```
npm install think-cache-redis
```## How to Usage
edit config file `src/config/adapter.js`, add options:
```js
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/