fixed #127 trigger 목록을 항상 file cache를 이용하도록 변경.

This commit is contained in:
bnu 2013-11-30 12:38:18 +09:00
parent 1b1961e9e2
commit 742af78932
2 changed files with 12 additions and 3 deletions

View file

@ -523,20 +523,27 @@ class moduleModel extends module
function getTriggers($trigger_name, $called_position)
{
// cache controll
$oCacheHandler = &CacheHandler::getInstance('object');
$oCacheHandler = &CacheHandler::getInstance('object', NULL, TRUE);
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);
}
if(!$output)
{
$args = new stdClass();
$args->trigger_name = $trigger_name;
$args->called_position = $called_position;
$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;
}