mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
#242 자주 사용되는 데이터를 file cache를 이용하도록 개선.
This commit is contained in:
parent
e4088586d7
commit
21ccd7f0d3
14 changed files with 118 additions and 100 deletions
|
|
@ -190,7 +190,7 @@ class documentAdminController extends document
|
|||
|
||||
$oDB->commit();
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
foreach($document_srl_list as $document_srl)
|
||||
|
|
@ -446,7 +446,7 @@ class documentAdminController extends document
|
|||
}
|
||||
}
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
if(is_array($document_srl_list))
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ class documentController extends document
|
|||
$output->add('document_srl',$obj->document_srl);
|
||||
$output->add('category_srl',$obj->category_srl);
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$obj->document_srl;
|
||||
|
|
@ -535,7 +535,7 @@ class documentController extends document
|
|||
|
||||
$output->add('document_srl',$obj->document_srl);
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$obj->document_srl;
|
||||
|
|
@ -629,7 +629,7 @@ class documentController extends document
|
|||
$oDB->commit();
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$document_srl;
|
||||
|
|
@ -778,7 +778,7 @@ class documentController extends document
|
|||
$oDB->commit();
|
||||
|
||||
// Clear cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
}
|
||||
|
|
@ -821,7 +821,7 @@ class documentController extends document
|
|||
// Register session
|
||||
$_SESSION['readed_document'][$document_srl] = true;
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$document_srl;
|
||||
|
|
@ -1215,7 +1215,7 @@ class documentController extends document
|
|||
}
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$document_srl;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class documentItem extends Object
|
|||
if(!$this->document_srl) return;
|
||||
|
||||
// cache controll
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport() && !count($this->columnList))
|
||||
{
|
||||
$cache_key = 'object_document_item:'.$this->document_srl;
|
||||
|
|
|
|||
|
|
@ -363,60 +363,75 @@ class documentModel extends document
|
|||
{
|
||||
if(is_null($GLOBALS['XE_EXTRA_KEYS'][$module_srl]))
|
||||
{
|
||||
$oExtraVar = &ExtraVar::getInstance($module_srl);
|
||||
$obj = new stdClass();
|
||||
$obj->module_srl = $module_srl;
|
||||
$obj->sort_index = 'var_idx';
|
||||
$obj->order = 'asc';
|
||||
$output = executeQueryArray('document.getDocumentExtraKeys', $obj);
|
||||
|
||||
// correcting index order
|
||||
$isFixed = FALSE;
|
||||
if(is_array($output->data))
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$prevIdx = 0;
|
||||
foreach($output->data as $no => $value)
|
||||
{
|
||||
// case first
|
||||
if($prevIdx == 0 && $value->idx != 1)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->var_idx = $value->idx;
|
||||
$args->new_idx = 1;
|
||||
executeQuery('document.updateDocumentExtraKeyIdx', $args);
|
||||
executeQuery('document.updateDocumentExtraVarIdx', $args);
|
||||
$prevIdx = 1;
|
||||
$isFixed = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
// case others
|
||||
if($prevIdx > 0 && $prevIdx + 1 != $value->idx)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->var_idx = $value->idx;
|
||||
$args->new_idx = $prevIdx + 1;
|
||||
executeQuery('document.updateDocumentExtraKeyIdx', $args);
|
||||
executeQuery('document.updateDocumentExtraVarIdx', $args);
|
||||
$prevIdx += 1;
|
||||
$isFixed = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
$prevIdx = $value->idx;
|
||||
}
|
||||
$cache_key = 'object:module_extra_keys_' . $module_srl;
|
||||
$output = $oCacheHandler->get($cache_key);
|
||||
}
|
||||
|
||||
if($isFixed)
|
||||
$oExtraVar = &ExtraVar::getInstance($module_srl);
|
||||
if(!$output)
|
||||
{
|
||||
$obj = new stdClass();
|
||||
$obj->module_srl = $module_srl;
|
||||
$obj->sort_index = 'var_idx';
|
||||
$obj->order = 'asc';
|
||||
$output = executeQueryArray('document.getDocumentExtraKeys', $obj);
|
||||
|
||||
// correcting index order
|
||||
$isFixed = FALSE;
|
||||
if(is_array($output->data))
|
||||
{
|
||||
$prevIdx = 0;
|
||||
foreach($output->data as $no => $value)
|
||||
{
|
||||
// case first
|
||||
if($prevIdx == 0 && $value->idx != 1)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->var_idx = $value->idx;
|
||||
$args->new_idx = 1;
|
||||
executeQuery('document.updateDocumentExtraKeyIdx', $args);
|
||||
executeQuery('document.updateDocumentExtraVarIdx', $args);
|
||||
$prevIdx = 1;
|
||||
$isFixed = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
// case others
|
||||
if($prevIdx > 0 && $prevIdx + 1 != $value->idx)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$args->var_idx = $value->idx;
|
||||
$args->new_idx = $prevIdx + 1;
|
||||
executeQuery('document.updateDocumentExtraKeyIdx', $args);
|
||||
executeQuery('document.updateDocumentExtraVarIdx', $args);
|
||||
$prevIdx += 1;
|
||||
$isFixed = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
$prevIdx = $value->idx;
|
||||
}
|
||||
}
|
||||
|
||||
if($isFixed)
|
||||
{
|
||||
$output = executeQueryArray('document.getDocumentExtraKeys', $obj);
|
||||
}
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$oCacheHandler->put($cache_key, $output);
|
||||
}
|
||||
}
|
||||
|
||||
$oExtraVar->setExtraVarKeys($output->data);
|
||||
$keys = $oExtraVar->getExtraVars();
|
||||
if(!$keys) $keys = array();
|
||||
|
||||
$GLOBALS['XE_EXTRA_KEYS'][$module_srl] = $keys;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ class layoutAdminController extends layout
|
|||
$cache_file = $oLayoutModel->getUserLayoutCache($args->layout_srl, Context::getLangType());
|
||||
FileHandler::removeFile($cache_file);
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$args->layout_srl;
|
||||
|
|
@ -330,7 +330,7 @@ class layoutAdminController extends layout
|
|||
$args->layout_srl = $layout_srl;
|
||||
$output = executeQuery("layout.deleteLayout", $args);
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$layout_srl;
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ class layoutModel extends layout
|
|||
function getLayout($layout_srl)
|
||||
{
|
||||
// cache controll
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$layout_srl;
|
||||
|
|
|
|||
|
|
@ -1233,7 +1233,7 @@ class memberAdminController extends member
|
|||
function _deleteMemberGroupCache($site_srl = 0)
|
||||
{
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object', null, true);
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_groups:'.$site_srl;
|
||||
|
|
|
|||
|
|
@ -1455,7 +1455,7 @@ class memberController extends member
|
|||
$output = executeQuery('member.addMemberToGroup',$args);
|
||||
$output2 = ModuleHandler::triggerCall('member.addMemberToGroup', 'after', $args);
|
||||
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_member_groups:'.$member_srl.'_'.$site_srl;
|
||||
|
|
@ -1501,7 +1501,7 @@ class memberController extends member
|
|||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_member_groups:'.$member_srl.'_'.$site_srl;
|
||||
|
|
@ -2117,15 +2117,17 @@ class memberController extends member
|
|||
}
|
||||
|
||||
$oDB->commit();
|
||||
// Save Session
|
||||
if(!$this->memberInfo) $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl);
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$args->member_srl;
|
||||
$cache_key = 'object:member_info:'.$args->member_srl;
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
|
||||
// Save Session
|
||||
if(!$this->memberInfo) $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl);
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$output->add('member_srl', $args->member_srl);
|
||||
|
|
@ -2139,7 +2141,7 @@ class memberController extends member
|
|||
{
|
||||
$output = executeQuery('member.updateChangePasswordDate', $args);
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$args->member_srl;
|
||||
|
|
|
|||
|
|
@ -284,10 +284,10 @@ class memberModel extends member
|
|||
//columnList size zero... get full member info
|
||||
if(!$GLOBALS['__member_info__'][$member_srl] || count($columnList) == 0)
|
||||
{
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$member_srl;
|
||||
$cache_key = 'object:member_info:'.$member_srl;
|
||||
$GLOBALS['__member_info__'][$member_srl] = $oCacheHandler->get($cache_key);
|
||||
}
|
||||
|
||||
|
|
@ -442,7 +442,7 @@ class memberModel extends member
|
|||
function getMemberGroups($member_srl, $site_srl = 0, $force_reload = false)
|
||||
{
|
||||
// cache controll
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_member_groups:'.$member_srl.'_'.$site_srl;
|
||||
|
|
@ -538,7 +538,7 @@ class memberModel extends member
|
|||
$site_srl = 0;
|
||||
}
|
||||
|
||||
$oCacheHandler = &CacheHandler::getInstance('object', null, true);
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_groups:'.$site_srl;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class moduleController extends module
|
|||
$output = executeQuery('module.insertTrigger', $args);
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object', NULL, TRUE);
|
||||
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$oCacheHandler->invalidateGroupKey('triggers');
|
||||
|
|
@ -91,7 +91,7 @@ class moduleController extends module
|
|||
$output = executeQuery('module.deleteTrigger', $args);
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object', NULL, TRUE);
|
||||
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$oCacheHandler->invalidateGroupKey('triggers');
|
||||
|
|
@ -187,7 +187,7 @@ class moduleController extends module
|
|||
$output = executeQuery('module.insertModuleConfig', $args);
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object', NULL, TRUE);
|
||||
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:module_config:module_'.$module.'_site_srl_'.$site_srl;
|
||||
|
|
@ -211,7 +211,7 @@ class moduleController extends module
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object', NULL, TRUE);
|
||||
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_module_part_config:'.$module.'_'.$module_srl;
|
||||
|
|
@ -288,7 +288,7 @@ class moduleController extends module
|
|||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($args->index_module_srl);
|
||||
$mid = $module_info->mid;
|
||||
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
if($args->site_srl == 0)
|
||||
|
|
@ -554,7 +554,7 @@ class moduleController extends module
|
|||
foreach($menuOutput->data as $itemInfo)
|
||||
{
|
||||
$itemInfo->url = $args->mid;
|
||||
|
||||
|
||||
$updateMenuItemOutput = $oMenuAdminController->updateMenuItem($itemInfo);
|
||||
if(!$updateMenuItemOutput->toBool())
|
||||
{
|
||||
|
|
@ -563,7 +563,7 @@ class moduleController extends module
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if mid changed, change mid of success_return_url to new mid
|
||||
if($module_info->mid != $args->mid && Context::get('success_return_url'))
|
||||
{
|
||||
|
|
@ -578,7 +578,7 @@ class moduleController extends module
|
|||
$output->add('module_srl',$args->module_srl);
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_module_info:'.$args->module_srl;
|
||||
|
|
@ -722,7 +722,7 @@ class moduleController extends module
|
|||
// commit
|
||||
$oDB->commit();
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_module_info:'.$args->module_srl;
|
||||
|
|
@ -971,7 +971,7 @@ class moduleController extends module
|
|||
}
|
||||
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$oCacheHandler->delete($cache_key);
|
||||
|
|
@ -1008,7 +1008,7 @@ class moduleController extends module
|
|||
$args->module_srl = $module_srl;
|
||||
return executeQuery('module.deleteModuleExtraVars', $args);
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:module_extra_vars_'.$module_srl;
|
||||
|
|
@ -1191,7 +1191,7 @@ class moduleController extends module
|
|||
|
||||
// Check uploaded file
|
||||
if(!checkUploadedFile($tmp)) return false;
|
||||
|
||||
|
||||
if(!@move_uploaded_file($tmp, $save_filename))
|
||||
{
|
||||
return false;
|
||||
|
|
@ -1228,7 +1228,7 @@ class moduleController extends module
|
|||
|
||||
// Check uploaded file
|
||||
if(!checkUploadedFile($tmp)) return false;
|
||||
|
||||
|
||||
// upload
|
||||
if(!@move_uploaded_file($tmp, $save_filename))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class moduleModel extends module
|
|||
}
|
||||
}
|
||||
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
// If domain is set, look for subsite
|
||||
if($domain !== '')
|
||||
{
|
||||
|
|
@ -123,7 +123,7 @@ class moduleModel extends module
|
|||
$args = new stdClass();
|
||||
$args->domain = $domain;
|
||||
$output = executeQuery('module.getSiteInfoByDomain', $args);
|
||||
if($oCacheHandler->isSupport() && $output->data) $oCacheHandler->put('domain_' . $domain, $output);
|
||||
if($oCacheHandler->isSupport()) $oCacheHandler->put('domain_' . $domain, $output);
|
||||
}
|
||||
if($output->toBool() && $output->data && $vid)
|
||||
{
|
||||
|
|
@ -135,7 +135,7 @@ class moduleModel extends module
|
|||
// If no virtual website was found, get default website
|
||||
if($domain === '')
|
||||
{
|
||||
if($oCacheHandler->isSupport()) $output = $oCacheHandler->get('default_site');
|
||||
if($oCacheHandler->isSupport()) $output = $oCacheHandler->get('default_site');
|
||||
if(!$output)
|
||||
{
|
||||
$args = new stdClass();
|
||||
|
|
@ -194,7 +194,7 @@ class moduleModel extends module
|
|||
$args = new stdClass();
|
||||
$args->mid = $mid;
|
||||
$args->site_srl = (int)$site_srl;
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$mid.'_'.$site_srl;
|
||||
|
|
@ -288,7 +288,7 @@ class moduleModel extends module
|
|||
$moduleInfo->designSettings->skin->mobileIsDefault = $moduleInfo->is_mskin_fix == 'N' ? 1 : 0;
|
||||
$moduleInfo->designSettings->skin->mobile = $skinInfoMobile->title;
|
||||
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$mid.'_'.$site_srl;
|
||||
|
|
@ -333,7 +333,7 @@ class moduleModel extends module
|
|||
// Get data
|
||||
$args = new stdClass();
|
||||
$args->module_srl = $module_srl;
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_module_info:'.$module_srl;
|
||||
|
|
@ -526,7 +526,7 @@ class moduleModel extends module
|
|||
function getTriggers($trigger_name, $called_position)
|
||||
{
|
||||
// cache controll
|
||||
$oCacheHandler = &CacheHandler::getInstance('object', NULL, TRUE);
|
||||
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$object_key = 'object:'.$trigger_name.'_'.$called_position;
|
||||
|
|
@ -1247,7 +1247,7 @@ class moduleModel extends module
|
|||
function getModuleConfig($module, $site_srl = 0)
|
||||
{
|
||||
// cache controll
|
||||
$oCacheHandler = &CacheHandler::getInstance('object', null, true);
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:module_config:module_'.$module.'_site_srl_'.$site_srl;
|
||||
|
|
@ -1262,11 +1262,11 @@ class moduleModel extends module
|
|||
$args->site_srl = $site_srl;
|
||||
$output = executeQuery('module.getModuleConfig', $args);
|
||||
$config = unserialize($output->data->config);
|
||||
if(!$config) $config = new stdClass;
|
||||
//insert in cache
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
if($config)
|
||||
$oCacheHandler->put($cache_key,$config);
|
||||
$oCacheHandler->put($cache_key,$config);
|
||||
}
|
||||
$GLOBALS['__ModuleConfig__'][$site_srl][$module] = $config;
|
||||
}
|
||||
|
|
@ -1283,7 +1283,7 @@ class moduleModel extends module
|
|||
function getModulePartConfig($module, $module_srl)
|
||||
{
|
||||
// cache controll
|
||||
$oCacheHandler = &CacheHandler::getInstance('object', null, true);
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_module_part_config:'.$module.'_'.$module_srl;
|
||||
|
|
@ -1298,10 +1298,11 @@ class moduleModel extends module
|
|||
$args->module_srl = $module_srl;
|
||||
$output = executeQuery('module.getModulePartConfig', $args);
|
||||
$config = unserialize($output->data->config);
|
||||
if(!$config) $config = new stdClass;
|
||||
//insert in cache
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
if($config) $oCacheHandler->put($cache_key,$config);
|
||||
$oCacheHandler->put($cache_key, $config);
|
||||
}
|
||||
$GLOBALS['__ModulePartConfig__'][$module][$module_srl] = $config;
|
||||
}
|
||||
|
|
@ -1595,7 +1596,7 @@ class moduleModel extends module
|
|||
{
|
||||
if(is_array($module_srl)) $module_srl = implode(',',$module_srl);
|
||||
// cache controll
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:module_extra_vars_'.$module_srl;
|
||||
|
|
@ -1718,7 +1719,7 @@ class moduleModel extends module
|
|||
}
|
||||
|
||||
// cache controll
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$output = $oCacheHandler->get($cache_key);
|
||||
|
|
@ -1765,7 +1766,7 @@ class moduleModel extends module
|
|||
{
|
||||
if(!$module_info->module_srl) return;
|
||||
// cache controll
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object_module_mobile_skin_vars:'.$module_info->module_srl;
|
||||
|
|
|
|||
|
|
@ -641,7 +641,7 @@ class pointController extends point
|
|||
$cache_filename = sprintf('%s%d.cache.txt', $cache_path, $member_srl);
|
||||
FileHandler::writeFile($cache_filename, $point);
|
||||
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object', null, true);
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$member_srl;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class sessionController extends session
|
|||
function write($session_key, $val)
|
||||
{
|
||||
if(!$session_key || !$this->session_started) return;
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$session_key;
|
||||
|
|
@ -116,7 +116,7 @@ class sessionController extends session
|
|||
{
|
||||
if(!$session_key || !$this->session_started) return;
|
||||
//remove session from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$session_key;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class sessionModel extends session
|
|||
|
||||
$output = new Object();
|
||||
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
$oCacheHandler = CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
$cache_key = 'object:'.$session_key;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue