mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
缓存驱动类调整
This commit is contained in:
6
library/think/cache/driver/File.php
vendored
6
library/think/cache/driver/File.php
vendored
@@ -11,6 +11,8 @@
|
||||
|
||||
namespace think\cache\driver;
|
||||
|
||||
use think\Cache;
|
||||
|
||||
/**
|
||||
* 文件类型缓存类
|
||||
* @author liu21st <liu21st@gmail.com>
|
||||
@@ -96,7 +98,7 @@ class File
|
||||
if (!is_file($filename)) {
|
||||
return false;
|
||||
}
|
||||
\think\Cache::$readTimes++;
|
||||
Cache::$readTimes++;
|
||||
$content = file_get_contents($filename);
|
||||
if (false !== $content) {
|
||||
$expire = (int) substr($content, 8, 12);
|
||||
@@ -127,7 +129,7 @@ class File
|
||||
*/
|
||||
public function set($name, $value, $expire = null)
|
||||
{
|
||||
\think\Cache::$writeTimes++;
|
||||
Cache::$writeTimes++;
|
||||
if (is_null($expire)) {
|
||||
$expire = $this->options['expire'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user