mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 23:29:57 +09:00
NOISSUE 성능개선, module_config, module_part_config, member_group 정보 cache 처리
This commit is contained in:
parent
0918ae8b7b
commit
8b1bab0e23
3 changed files with 49 additions and 10 deletions
|
|
@ -1086,7 +1086,9 @@ class memberAdminController extends member
|
|||
}
|
||||
|
||||
if(!$args->group_srl) $args->group_srl = getNextSequence();
|
||||
return executeQuery('member.insertGroup', $args);
|
||||
$output = executeQuery('member.insertGroup', $args);
|
||||
$this->_deleteMemberGroupCache($args->site_srl);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1096,6 +1098,7 @@ class memberAdminController extends member
|
|||
*/
|
||||
function updateGroup($args)
|
||||
{
|
||||
if(!$args->site_srl) $args->site_srl = 0;
|
||||
// Check the value of is_default.
|
||||
if(!$args->group_srl) return new Object(-1, 'lang->msg_not_founded');
|
||||
if($args->is_default!='Y')
|
||||
|
|
@ -1108,7 +1111,9 @@ class memberAdminController extends member
|
|||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
|
||||
return executeQuery('member.updateGroup', $args);
|
||||
$output = executeQuery('member.updateGroup', $args);
|
||||
$this->_deleteMemberGroupCache($args->site_srl);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1134,9 +1139,12 @@ class memberAdminController extends member
|
|||
// Change to default_group_srl
|
||||
$this->changeGroup($group_srl, $default_group_srl);
|
||||
|
||||
|
||||
$args = new stdClass;
|
||||
$args->group_srl = $group_srl;
|
||||
return executeQuery('member.deleteGroup', $args);
|
||||
$output = executeQuery('member.deleteGroup', $args);
|
||||
$this->_deleteMemberGroupCache($site_srl);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1213,9 +1221,26 @@ class memberAdminController extends member
|
|||
executeQuery('member.updateMemberGroupListOrder', $args);
|
||||
}
|
||||
|
||||
$this->_deleteMemberGroupCache($vars->site_srl);
|
||||
|
||||
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminGroupList'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete cached group data
|
||||
* @return void
|
||||
*/
|
||||
function _deleteMemberGroupCache($site_srl = 0)
|
||||
{
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_groups:'.$site_srl;
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register denied ID
|
||||
* @param string $user_id
|
||||
|
|
|
|||
|
|
@ -537,11 +537,25 @@ class memberModel extends member
|
|||
{
|
||||
$site_srl = 0;
|
||||
}
|
||||
$args = new stdClass();
|
||||
$args->site_srl = $site_srl;
|
||||
$args->sort_index = 'list_order';
|
||||
$args->order_type = 'asc';
|
||||
$output = executeQueryArray('member.getGroups', $args);
|
||||
|
||||
$oCacheHandler = &CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_groups:'.$site_srl;
|
||||
$output = $oCacheHandler->get($cache_key);
|
||||
}
|
||||
if(!$output)
|
||||
{
|
||||
|
||||
$args = new stdClass();
|
||||
$args->site_srl = $site_srl;
|
||||
$args->sort_index = 'list_order';
|
||||
$args->order_type = 'asc';
|
||||
$output = executeQueryArray('member.getGroups', $args);
|
||||
//insert in cache
|
||||
if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key,$output);
|
||||
}
|
||||
|
||||
if(!$output->toBool() || !$output->data)
|
||||
{
|
||||
return array();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue