mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 13:02:15 +09:00
fixed #127 trigger 목록을 항상 file cache를 이용하도록 변경.
This commit is contained in:
parent
1b1961e9e2
commit
742af78932
2 changed files with 12 additions and 3 deletions
|
|
@ -64,6 +64,7 @@ class moduleController extends module
|
||||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||||
if($oCacheHandler->isSupport())
|
if($oCacheHandler->isSupport())
|
||||||
{
|
{
|
||||||
|
$oCacheHandler->invalidateGroupKey('triggers');
|
||||||
$cache_key = 'object:'.$trigger_name.'_'.$called_position;
|
$cache_key = 'object:'.$trigger_name.'_'.$called_position;
|
||||||
$oCacheHandler->delete($cache_key);
|
$oCacheHandler->delete($cache_key);
|
||||||
}
|
}
|
||||||
|
|
@ -93,6 +94,7 @@ class moduleController extends module
|
||||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||||
if($oCacheHandler->isSupport())
|
if($oCacheHandler->isSupport())
|
||||||
{
|
{
|
||||||
|
$oCacheHandler->invalidateGroupKey('triggers');
|
||||||
$cache_key = 'object:'.$trigger_name.'_'.$called_position;
|
$cache_key = 'object:'.$trigger_name.'_'.$called_position;
|
||||||
$oCacheHandler->delete($cache_key);
|
$oCacheHandler->delete($cache_key);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -523,20 +523,27 @@ class moduleModel extends module
|
||||||
function getTriggers($trigger_name, $called_position)
|
function getTriggers($trigger_name, $called_position)
|
||||||
{
|
{
|
||||||
// cache controll
|
// cache controll
|
||||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
$oCacheHandler = &CacheHandler::getInstance('object', NULL, TRUE);
|
||||||
if($oCacheHandler->isSupport())
|
if($oCacheHandler->isSupport())
|
||||||
{
|
{
|
||||||
$cache_key = 'object:'.$trigger_name.'_'.$called_position;
|
$object_key = 'object:'.$trigger_name.'_'.$called_position;
|
||||||
|
$cache_key = $oCacheHandler->getGroupKey('triggers', $object_key);
|
||||||
|
|
||||||
$output = $oCacheHandler->get($cache_key);
|
$output = $oCacheHandler->get($cache_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$output)
|
if(!$output)
|
||||||
{
|
{
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
$args->trigger_name = $trigger_name;
|
$args->trigger_name = $trigger_name;
|
||||||
$args->called_position = $called_position;
|
$args->called_position = $called_position;
|
||||||
$output = executeQueryArray('module.getTriggers',$args);
|
$output = executeQueryArray('module.getTriggers',$args);
|
||||||
if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key,$output);
|
|
||||||
|
if($output->toBool() && $oCacheHandler->isSupport()) {
|
||||||
|
$oCacheHandler->put($cache_key, $output);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $output->data;
|
return $output->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue