forked from leftypol/leftypol
cache.php: make it more forgiving to old redis cache config
This commit is contained in:
parent
399e33c97a
commit
554bfdea44
1 changed files with 3 additions and 1 deletions
|
@ -20,10 +20,12 @@ class Cache {
|
|||
$config['cache']['memcached']
|
||||
);
|
||||
case 'redis':
|
||||
$port = $config['cache']['redis'][1];
|
||||
$port = empty($port) ? null : intval($port);
|
||||
return new RedisCacheDriver(
|
||||
$config['cache']['prefix'],
|
||||
$config['cache']['redis'][0],
|
||||
$config['cache']['redis'][1],
|
||||
$port,
|
||||
$config['cache']['redis'][2],
|
||||
$config['cache']['redis'][3]
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue