mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进缓存驱动
This commit is contained in:
2
library/think/cache/driver/Memcache.php
vendored
2
library/think/cache/driver/Memcache.php
vendored
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
2
library/think/cache/driver/Redis.php
vendored
2
library/think/cache/driver/Redis.php
vendored
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user