mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进File和Lite缓存驱动的has方法判断
This commit is contained in:
3
library/think/cache/driver/File.php
vendored
3
library/think/cache/driver/File.php
vendored
@@ -90,8 +90,7 @@ class File extends Driver
|
||||
*/
|
||||
public function has($name)
|
||||
{
|
||||
$filename = $this->getCacheKey($name);
|
||||
return is_file($filename);
|
||||
return $this->get($name) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
3
library/think/cache/driver/Lite.php
vendored
3
library/think/cache/driver/Lite.php
vendored
@@ -61,8 +61,7 @@ class Lite extends Driver
|
||||
*/
|
||||
public function has($name)
|
||||
{
|
||||
$filename = $this->getCacheKey($name);
|
||||
return is_file($filename);
|
||||
return $this->get($name) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user