改进缓存驱动

This commit is contained in:
thinkphp
2018-08-05 10:05:29 +08:00
parent 368272f7e3
commit 31635b3b4e
2 changed files with 2 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ class Memcache extends Driver
public function has($name)
{
$key = $this->getCacheKey($name);
return $this->handler->get($key) ? true : false;
return false !== $this->handler->get($key);
}
/**

View File

@@ -70,7 +70,7 @@ class Redis extends Driver
*/
public function has($name)
{
return $this->handler->get($this->getCacheKey($name)) ? true : false;
return $this->handler->exists($this->getCacheKey($name));
}
/**