r7485 보완

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7486 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2010-05-26 01:47:54 +00:00
parent 19497e2837
commit d0c7dfcfaf
2 changed files with 3 additions and 5 deletions

View file

@ -66,7 +66,7 @@
} }
function truncate() { function truncate() {
apc_clear_cache('user'); return apc_clear_cache('user');
} }
} }
?> ?>

View file

@ -93,7 +93,7 @@ function useContentEncoding(){
function getCacheKey($list){ function getCacheKey($list){
$key = 'optimized:' . join('',$list); $key = 'optimized:' . join('',$list);
return $key; return md5($key);
} }
function printFileList($list){ function printFileList($list){
@ -231,7 +231,6 @@ function convertEncodingStr($str) {
return $str; return $str;
} }
if($type == '.js'){ if($type == '.js'){
printFileList($list); printFileList($list);
}else if($type == '.css'){ }else if($type == '.css'){
@ -244,13 +243,12 @@ if($type == '.js'){
} }
$cache_key = getCacheKey($css); $cache_key = getCacheKey($css);
$buff = $oCacheHandler->get($cache_key, $mtime); $buff = $oCacheHandler->get($cache_key, $mtime);
if(!$buff){ if(!$buff){
$buff = ''; $buff = '';
$css = array();
foreach($list as $file){ foreach($list as $file){
$buff .= makeCacheFileCSS($file, '', true); $buff .= makeCacheFileCSS($file, '', true);
$css[] = getRealPath($cache_file);
} }
$oCacheHandler->put($cache_key, $buff); $oCacheHandler->put($cache_key, $buff);