Browse Source

Merge pull request #26551 from nextcloud/fix/noid/redis-exists-bool

ensure redis returns bool for hasKey
tags/v22.0.0beta1
Roeland Jago Douma 3 years ago
parent
commit
f031dd61c1
No account linked to committer's email address
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      lib/private/Http/Client/NegativeDnsCache.php
  2. 1
    1
      lib/private/Memcache/Redis.php

+ 1
- 1
lib/private/Http/Client/NegativeDnsCache.php 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));
}
}

+ 1
- 1
lib/private/Memcache/Redis.php 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) {

Loading…
Cancel
Save