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:
Bart Visscher 2014-05-08 18:11:29 +02:00
parent 8ede209ea3
commit 88225db4af
1 changed files with 1 additions and 1 deletions

View File

@ -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) {