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