清除配置缓存
boolean Core_Config::clear_cache( )
boolean
public function clear_cache($type = '')
{
if (!$this->is_use_cache)
{
// 非普通文件写入,不缓存,无需清理
return true;
}
$projects = array_keys((array)Core::config('core.projects'));
if ($projects)foreach ($projects as $project)
{
# 所有项目的配置文件
$tmpfile[] = $this->get_config_cache_file($project, $type);
}
$rs = File::unlink($tmpfile);
if (IS_DEBUG)Core::debug()->log('clear extends config cache '. ($rs?'success':'fail') .'.');
return $rs;
}