Merge pull request #26551 from nextcloud/fix/noid/redis-exists-bool
ensure redis returns bool for hasKey
This commit is contained in:
commit
f031dd61c1
|
@ -46,6 +46,6 @@ class NegativeDnsCache {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isNegativeCached(string $domain, int $type) : bool {
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ class Redis extends Cache implements IMemcacheTTL {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hasKey($key) {
|
public function hasKey($key) {
|
||||||
return self::$cache->exists($this->getNameSpace() . $key);
|
return (bool)self::$cache->exists($this->getNameSpace() . $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function remove($key) {
|
public function remove($key) {
|
||||||
|
|
Loading…
Reference in New Issue