cache.php: make it more forgiving to old redis cache config

This commit is contained in:
Zankaria 2024-12-06 21:43:36 +01:00
parent 399e33c97a
commit 554bfdea44

View file

@ -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]
);