Skip to content

Commit

Permalink
Merge pull request #724 from AntonShevchuk/patch-2
Browse files Browse the repository at this point in the history
Update redis.md
  • Loading branch information
makasim authored Jan 15, 2019
2 parents 35b15fc + c076598 commit 3f1912a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/transport/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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);
```
Expand Down

0 comments on commit 3f1912a

Please sign in to comment.