Comparing version 2.0.1 to 2.1.0
@@ -12,2 +12,3 @@ 'use strict'; | ||
supportTimeCommand: true, | ||
// Redis: require('ioredis'), // customize ioredis version, only set when you needed | ||
@@ -14,0 +15,0 @@ // Single Redis |
2.1.0 / 2018-11-28 | ||
================== | ||
**features** | ||
* [[`ee3fda1`](http://github.com/eggjs/egg-redis/commit/ee3fda1f95a178a6120fe32141c903d19f7f5ecb)] - feat: support customize ioredis version (#21) (Yiyu He <<dead_horse@qq.com>>) | ||
2.0.1 / 2018-11-28 | ||
@@ -3,0 +9,0 @@ ================== |
'use strict'; | ||
const assert = require('assert'); | ||
const Redis = require('ioredis'); | ||
@@ -12,2 +11,3 @@ module.exports = app => { | ||
function createClient(config, app) { | ||
const Redis = app.config.redis.Redis || require('ioredis'); | ||
let client; | ||
@@ -14,0 +14,0 @@ |
{ | ||
"name": "egg-redis", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "Redis plugin for egg", | ||
@@ -5,0 +5,0 @@ "eggPlugin": { |
@@ -88,5 +88,5 @@ # egg-redis | ||
$vim /etc/redis/redis.conf | ||
$vim /etc/redis/redis.conf | ||
requirepass xxxxxxxxxx // xxxxxxxxxx是你的密码 | ||
requirepass xxxxxxxxxx // xxxxxxxxxx is your password | ||
@@ -104,2 +104,19 @@ ``` | ||
### Customize `ioredis` version | ||
`egg-redis` using ioredis@3 now, if you want to upgrade your ioredis, you can pass the instance by `config.redis.Redis`: | ||
```js | ||
// config/config.default.js | ||
config.redis = { | ||
Redis: require('ioredis'), // customize ioredis version, only set when you needed | ||
client: { | ||
port: 6379, // Redis port | ||
host: '127.0.0.1', // Redis host | ||
password: 'auth', | ||
db: 0, | ||
}, | ||
} | ||
``` | ||
## Usage | ||
@@ -106,0 +123,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
13207
109
213
0