1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-08 23:39:46 +01:00

Merge pull request #848 from Zankaria/redis-cache-config

Make vichan more forgiving with old redis cache configuration
This commit is contained in:
Lorenzo Yario 2024-12-08 08:48:14 -08:00 committed by GitHub
commit d7f4c755cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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