1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-28 01:10:51 +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']) { switch ($config['cache']['enabled']) {
case 'memcached': case 'memcached':
case 'redis':
if (!self::$cache) if (!self::$cache)
self::init(); self::init();
self::$cache->delete($key); self::$cache->delete($key);
break; break;
case 'redis':
if (!self::$cache)
self::init();
self::$cache->del($key);
break;
case 'apc': case 'apc':
apc_delete($key); apc_delete($key);
break; break;