mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12: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)
|
public function has($name)
|
||||||
{
|
{
|
||||||
$filename = $this->getCacheKey($name);
|
return $this->get($name) ? true : false;
|
||||||
return is_file($filename);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
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)
|
public function has($name)
|
||||||
{
|
{
|
||||||
$filename = $this->getCacheKey($name);
|
return $this->get($name) ? true : false;
|
||||||
return is_file($filename);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user