MDL-63050 cachestore_redis: Update hExists to check empty

This commit is contained in:
Andrew Nicols
2018-08-02 10:59:53 +08:00
parent ed3ff719f2
commit 31b02f6ef5
+1 -1
View File
@@ -325,7 +325,7 @@ class cachestore_redis extends cache_store implements cache_is_key_aware, cache_
* @return bool True if the key exists, false if it does not.
*/
public function has($key) {
return $this->redis->hExists($this->hash, $key);
return !empty($this->redis->hExists($this->hash, $key));
}
/**