mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
Merge pull request #1090 from izuzero/develop-procCacheTriggers
트리거 관련 함수 호출시간 단축
This commit is contained in:
commit
bd9793c6e5
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