From 734bd0704d23e7de94a3aa28902d7dafd7c8b95b Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Wed, 2 Aug 2017 21:02:18 +0100 Subject: [PATCH] Update docs --- packages/keyv-redis/README.md | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/packages/keyv-redis/README.md b/packages/keyv-redis/README.md index f6b7b60..7f9b0e8 100644 --- a/packages/keyv-redis/README.md +++ b/packages/keyv-redis/README.md @@ -11,33 +11,24 @@ Redis storage adapter for [Keyv](https://github.com/lukechilds/keyv). TTL functi ## Install ```shell -npm install --save keyv-redis +npm install --save keyv keyv-redis ``` ## Usage ```js const Keyv = require('keyv'); -const KeyvRedis = require('keyv-redis'); -const redis = new KeyvRedis('redis://user:secret@localhost:6379'); -redis.client.on('error', handleError); - -const keyv = new Keyv({ store: redis }); +const keyv = new Keyv('redis://user:pass@localhost:6379'); +keyv.on('error', handleConnectionError); ``` -## API - -### new KeyvRedis([options]) - -Returns a Keyv storage adapter for Redis. - -#### options +You can pass any valid options directly through to the Redis client. -Type: `undefined`, `string`, `object`
-Default: `undefined` - -A Redis connection URI string or connection object. If `undefined`, default Redis settings will be used. View [`redis.createClient()`](https://github.com/NodeRedis/node_redis#rediscreateclient) docs for more info. +```js +const keyv = new Keyv('redis://user:pass@localhost:6379', { disable_resubscribing: true }); +``` +View [`redis.createClient()`](https://github.com/NodeRedis/node_redis#rediscreateclient) documentation for more information in accepted arguments. ## License