ensure redis returns bool for hasKey

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2021-04-13 23:07:54 +02:00
parent 23b8e4a1d4
commit 9f5480eef4
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
2 changed files with 2 additions and 2 deletions

View File

@ -46,6 +46,6 @@ class NegativeDnsCache {
}
public function isNegativeCached(string $domain, int $type) : bool {
return $this->cache->hasKey($this->createCacheKey($domain, $type));
return (bool)$this->cache->hasKey($this->createCacheKey($domain, $type));
}
}

View File

@ -69,7 +69,7 @@ class Redis extends Cache implements IMemcacheTTL {
}
public function hasKey($key) {
return self::$cache->exists($this->getNameSpace() . $key);
return (bool)self::$cache->exists($this->getNameSpace() . $key);
}
public function remove($key) {