mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
트리거 관련 함수 호출시간 단축
1. 함수 로직 변경 - moduleController::insertTrigger - moduleController::deleteTrigger - moduleModel::getTriggers - moduleModel::getTrigger 2. 그룹 캐시 저장을에서 단일 캐시 파일 저장으로 변경
This commit is contained in:
parent
d4e10dd338
commit
a38d7703fd
2 changed files with 48 additions and 44 deletions
|
|
@ -75,17 +75,18 @@ class moduleController extends module
|
|||
$args->called_position = $called_position;
|
||||
|
||||
$output = executeQuery('module.insertTrigger', $args);
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
|
||||
if($oCacheHandler->isSupport())
|
||||
if($output->toBool())
|
||||
{
|
||||
$oCacheHandler->invalidateGroupKey('triggers');
|
||||
//remove from cache
|
||||
$GLOBALS['__triggers__'] = NULL;
|
||||
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'triggers';
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
}
|
||||
|
||||
// Delete all the files which contain trigger information
|
||||
FileHandler::removeFilesInDir("./files/cache/triggers");
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -103,17 +104,18 @@ class moduleController extends module
|
|||
$args->called_position = $called_position;
|
||||
|
||||
$output = executeQuery('module.deleteTrigger', $args);
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
|
||||
if($oCacheHandler->isSupport())
|
||||
if($output->toBool())
|
||||
{
|
||||
$oCacheHandler->invalidateGroupKey('triggers');
|
||||
//remove from cache
|
||||
$GLOBALS['__triggers__'] = NULL;
|
||||
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'triggers';
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove the trigger cache
|
||||
FileHandler::removeFilesInDir('./files/cache/triggers');
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue