我们使用织梦系统有很长一段时间后,不间断的在后台更新系统缓存的时候,有些缓存文件夹及缓存文件没有被清理,导致日积月累的垃圾缓存文件越来越多,现在增强更新系统缓存功能清理冗余的缓存文件及文件夹。
增强织梦“更新系统缓存”清理沉余缓存的功能
	
	主要增加清理以下缓存文件夹的功能:
	datacache
	data plcache
	datasessions
实现方法:
打开“dede/sys_cache_up.php”,
	找到:
	CheckPurview('sys_ArcBatch');
	在其下一行添加以下代码:
	//清理缓存增加版
	function clean_cachefiles( $path ){
	$list = array();
	foreach( glob( $path .'/*') as $item ){
	if( is_dir( $item ) ){
	$list = array_merge( $list , clean_cachefiles( $item ) );
	}else{
	$list[] = $item;
	}
	}
	foreach( $list as $tmpfile ){
	@unlink( $tmpfile );
	}
	return true;
	}
	找到:
	if($uparc==1)
	在其上一行添加以下代码:
	//清理datacache
	clean_cachefiles("../data/cache");
	//清理datatplcache
	clean_cachefiles("../data/tplcache");
	//清理datasessions
	clean_cachefiles("../data/sessions");
如此便可更加有效的清理系统缓存,每次更新缓存的时候会自动帮你清理缓存文件了!