[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
1 changed files with 2 additions and 2 deletions

View File

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