From c076598d8f0d8c84a2841a4b5b2ee42e80336060 Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 15 Jan 2019 16:13:09 +0200 Subject: [PATCH] Update redis.md Updated example for setup custom options of PRedis provider --- docs/transport/redis.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/transport/redis.md b/docs/transport/redis.md index df324484c..de9c5d62d 100644 --- a/docs/transport/redis.md +++ b/docs/transport/redis.md @@ -107,7 +107,7 @@ $connectionFactory = new RedisConnectionFactory([ $context = $connectionFactory->createContext(); ``` -* With custom redis instance: +* With predis and custom [options](https://github.com/nrk/predis/wiki/Client-Options): It gives you more control over vendor specific features. @@ -116,10 +116,15 @@ It gives you more control over vendor specific features. use Enqueue\Redis\RedisConnectionFactory; use Enqueue\Redis\PRedis; -$config = []; -$options = []; +$config = [ + 'host' => 'localhost', + 'port' => 6379, + 'predis_options' => [ + 'prefix' => 'ns:' + ] +]; -$redis = new PRedis(new \PRedis\Client($config, $options)); +$redis = new PRedis($config); $factory = new RedisConnectionFactory($redis); ```