mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-02 08:42:15 +09:00
#242 object cache 정리
This commit is contained in:
parent
d4d43c1382
commit
37c5e114ec
20 changed files with 513 additions and 253 deletions
|
|
@ -176,6 +176,12 @@ class layoutAdminController extends layout
|
|||
{
|
||||
$output = executeQuery('layout.updateModuleLayout', $update_args);
|
||||
}
|
||||
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$oCacheHandler->invalidateGroupKey('site_and_module');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -260,7 +266,8 @@ class layoutAdminController extends layout
|
|||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$args->layout_srl;
|
||||
$object_key = 'layout:' . $args->layout_srl;
|
||||
$cache_key = $oCacheHandler->getGroupKey('site_and_module', $object_key);
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
}
|
||||
|
|
@ -333,7 +340,8 @@ class layoutAdminController 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);
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
|
|||
|
|
@ -86,6 +86,8 @@ 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)
|
||||
|
|
@ -99,6 +101,13 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue