1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-23 23:20:57 +01:00

Fix redis 'delete' deprecation error

Redis deprecated the 'delete' alias for 'del'. Posting while using redis cache would return an error, the post would still be posted.
This commit is contained in:
discomrade 2022-01-17 04:27:08 +00:00 committed by Fredrick Brennan
parent 617f2a68da
commit 8512321669

View File

@ -118,11 +118,15 @@ class Cache {
switch ($config['cache']['enabled']) {
case 'memcached':
case 'redis':
if (!self::$cache)
self::init();
self::$cache->delete($key);
break;
case 'redis':
if (!self::$cache)
self::init();
self::$cache->del($key);
break;
case 'apc':
apc_delete($key);
break;