改进File和Lite缓存驱动的has方法判断

This commit is contained in:
thinkphp
2016-08-30 10:35:19 +08:00
parent d6eec5d568
commit 64581a05f2
2 changed files with 2 additions and 4 deletions

View File

@@ -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);
} }
/** /**

View File

@@ -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);
} }
/** /**