mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
cache类的init方法增加参数 File缓存驱动去掉不再支持的path_level参数
This commit is contained in:
@@ -58,13 +58,14 @@ class Cache
|
||||
/**
|
||||
* 自动初始化缓存
|
||||
* @access public
|
||||
* @param array $options 配置数组
|
||||
* @return void
|
||||
*/
|
||||
public static function init()
|
||||
public static function init(array $options = [])
|
||||
{
|
||||
if (is_null(self::$handler)) {
|
||||
// 自动初始化缓存
|
||||
self::connect(Config::get('cache'));
|
||||
self::connect($options ?: Config::get('cache'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
library/think/cache/driver/File.php
vendored
2
library/think/cache/driver/File.php
vendored
@@ -17,11 +17,9 @@ namespace think\cache\driver;
|
||||
*/
|
||||
class File
|
||||
{
|
||||
|
||||
protected $options = [
|
||||
'expire' => 0,
|
||||
'cache_subdir' => false,
|
||||
'path_level' => 1,
|
||||
'prefix' => '',
|
||||
'path' => CACHE_PATH,
|
||||
'data_compress' => false,
|
||||
|
||||
Reference in New Issue
Block a user