mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
#440 위젯 캐시 재생성시 lock파일을 이용하여 하나의 위젯에 대해선 1번의 캐시 재생성이 이루어지도록 로직 변경.
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4283 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
889742d283
commit
b090d9cf0c
3 changed files with 62 additions and 34 deletions
|
|
@ -180,22 +180,9 @@
|
|||
|
||||
$content = $module_info->content;
|
||||
|
||||
// 언어 종류 가져옴
|
||||
$lang_list = Context::get('lang_supported');
|
||||
|
||||
// 위젯 캐시 sequence 를 가져옴
|
||||
preg_match_all('/widget_sequence="([0-9]+)"/i',$content, $matches);
|
||||
|
||||
$cache_path = './files/cache/widget_cache/';
|
||||
|
||||
for($i=0;$i<count($matches[1]);$i++) {
|
||||
$sequence = $matches[1][$i];
|
||||
|
||||
foreach($lang_list as $lang_type => $val) {
|
||||
$cache_file = sprintf('%s%d.%s.cache', $cache_path, $sequence, $lang_type);
|
||||
@unlink($cache_file);
|
||||
}
|
||||
}
|
||||
// widget controller 의 캐시파일 재생성 실행
|
||||
$oWidgetController = &getController('widget');
|
||||
$oWidgetController->recompileWidget($content);
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue