#242 object cache 정리

This commit is contained in:
bnu 2014-01-06 16:48:54 +09:00
parent d4d43c1382
commit 37c5e114ec
20 changed files with 513 additions and 253 deletions

View file

@ -262,9 +262,11 @@ class layoutModel extends layout
$oCacheHandler = CacheHandler::getInstance('object', null, true);
if($oCacheHandler->isSupport())
{
$cache_key = 'object:'.$layout_srl;
$object_key = 'layout:' . $layout_srl;
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
$layout_info = $oCacheHandler->get($cache_key);
}
if(!$layout_info)
{
// Get information from the DB
@ -272,18 +274,12 @@ class layoutModel extends layout
$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);
// If deleted layout files, delete layout instance
// if (!$layout_info) {
// $oLayoutController = getAdminController('layout');
// $oLayoutController->deleteLayout($layout_srl);
// return;
// }
//insert in cache
if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key,$layout_info);
if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key, $layout_info);
}
return $layout_info;
}
@ -294,7 +290,9 @@ class layoutModel extends layout
$args->layout_srl = $layout_srl;
$output = executeQuery('layout.getLayout', $args, $columnList);
if(!$output->toBool())
{
return;
}
return $output->data;
}