[CORE][Cache] Fix wrong return type in Cache::delete

This commit is contained in:
Hugo Sales 2021-12-16 11:01:23 +00:00
parent 1b45fb251a
commit 5dca5568b7
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -204,7 +204,7 @@ abstract class Cache
public static function delete(string $key, string $pool = 'default'): bool public static function delete(string $key, string $pool = 'default'): bool
{ {
if (isset(self::$redis[$pool])) { if (isset(self::$redis[$pool])) {
return self::$redis[$pool]->del($key); return self::$redis[$pool]->del($key) === 1;
} else { } else {
return self::$pools[$pool]->delete($key); return self::$pools[$pool]->delete($key);
} }
@ -326,7 +326,7 @@ abstract class Cache
public static function deleteList(string $key, string $pool = 'default'): bool public static function deleteList(string $key, string $pool = 'default'): bool
{ {
if (isset(self::$redis[$pool])) { if (isset(self::$redis[$pool])) {
return self::$redis[$pool]->del($key) == 1; return self::$redis[$pool]->del($key) === 1;
} else { } else {
return self::delete($key, $pool); return self::delete($key, $pool);
} }