mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-12 15:21:40 +09:00
fix #424 중복 설정된 cache 설정 제거
This commit is contained in:
parent
c40fda8951
commit
0bd8a16194
3 changed files with 9 additions and 48 deletions
|
|
@ -262,15 +262,8 @@ class layoutAdminController extends layout
|
|||
$oLayoutModel = getModel('layout');
|
||||
$cache_file = $oLayoutModel->getUserLayoutCache($args->layout_srl, Context::getLangType());
|
||||
FileHandler::removeFile($cache_file);
|
||||
//remove from cache
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$object_key = 'layout:' . $args->layout_srl;
|
||||
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -336,14 +329,7 @@ class layoutAdminController extends layout
|
|||
$args = new stdClass();
|
||||
$args->layout_srl = $layout_srl;
|
||||
$output = executeQuery("layout.deleteLayout", $args);
|
||||
//remove from cache
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$object_key = 'layout:'.$layout_srl;
|
||||
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return new Object(0,'success_deleted');
|
||||
|
|
|
|||
|
|
@ -86,8 +86,6 @@ class layout extends ModuleObject
|
|||
$oDB->addColumn('layouts','layout_type','char',1,'P',true);
|
||||
}
|
||||
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
|
||||
$args->layout = '.';
|
||||
$output = executeQueryArray('layout.getLayoutDotList', $args);
|
||||
if($output->data && count($output->data) > 0)
|
||||
|
|
@ -101,13 +99,6 @@ class layout extends ModuleObject
|
|||
$args->layout = implode('|@|', $layout_path);
|
||||
$args->layout_srl = $layout->layout_srl;
|
||||
$output = executeQuery('layout.updateLayout', $args);
|
||||
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$object_key = 'layout:' . $args->layout_srl;
|
||||
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -258,31 +258,15 @@ class layoutModel extends layout
|
|||
*/
|
||||
function getLayout($layout_srl)
|
||||
{
|
||||
$layout_info = false;
|
||||
// Get information from the DB
|
||||
$args = new stdClass();
|
||||
$args->layout_srl = $layout_srl;
|
||||
$output = executeQuery('layout.getLayout', $args);
|
||||
if(!$output->data) return;
|
||||
|
||||
// cache controll
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$object_key = 'layout:' . $layout_srl;
|
||||
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||
$layout_info = $oCacheHandler->get($cache_key);
|
||||
}
|
||||
// Return xml file informaton after listing up the layout and extra_vars
|
||||
$layout_info = $this->getLayoutInfo($layout, $output->data, $output->data->layout_type);
|
||||
|
||||
if($layout_info === false)
|
||||
{
|
||||
// Get information from the DB
|
||||
$args = new stdClass();
|
||||
$args->layout_srl = $layout_srl;
|
||||
$output = executeQuery('layout.getLayout', $args);
|
||||
if(!$output->data) return;
|
||||
|
||||
// Return xml file informaton after listing up the layout and extra_vars
|
||||
$layout_info = $this->getLayoutInfo($layout, $output->data, $output->data->layout_type);
|
||||
|
||||
//insert in cache
|
||||
if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key, $layout_info);
|
||||
}
|
||||
return $layout_info;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue