Redis options
This commit is contained in:
@ -33,15 +33,11 @@ return [
|
||||
'host' => $container->get('REDIS_HOST'),
|
||||
'port' => $container->get('REDIS_PORT')
|
||||
];
|
||||
$parameters = [];
|
||||
if ($container->has('REDIS_USER')) {
|
||||
$parameters['username'] = $container->get('REDIS_USER');
|
||||
$options['username'] = $container->get('REDIS_USER');
|
||||
}
|
||||
if ($container->has('REDIS_PASSWORD')) {
|
||||
$parameters['password'] = $container->get('REDIS_PASSWORD');
|
||||
}
|
||||
if (!empty($parameters)) {
|
||||
$options['parameters'] = $parameters;
|
||||
$options['password'] = $container->get('REDIS_PASSWORD');
|
||||
}
|
||||
return new Predis\Client($options);
|
||||
},
|
||||
|
Reference in New Issue
Block a user