cache类的init方法增加参数 File缓存驱动去掉不再支持的path_level参数

This commit is contained in:
thinkphp
2016-08-08 17:48:17 +08:00
parent 3923c2dbb5
commit 41f7145ace
2 changed files with 3 additions and 4 deletions

View File

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