Memcached hasKey should test for success, the get can fail for other reasons.
One of the other failures is no running server.
This commit is contained in:
parent
8ede209ea3
commit
88225db4af
|
@ -57,7 +57,7 @@ class Memcached extends Cache {
|
|||
|
||||
public function hasKey($key) {
|
||||
self::$cache->get($this->getNamespace() . $key);
|
||||
return self::$cache->getResultCode() !== \Memcached::RES_NOTFOUND;
|
||||
return self::$cache->getResultCode() === \Memcached::RES_SUCCESS;
|
||||
}
|
||||
|
||||
public function remove($key) {
|
||||
|
|
Loading…
Reference in New Issue