mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 19:51:42 +09:00
Caching implementation for objects
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8745 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
1b47a294d3
commit
70a69ff4fe
18 changed files with 709 additions and 322 deletions
|
|
@ -149,6 +149,22 @@
|
|||
}
|
||||
|
||||
$oDB->commit();
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
foreach($document_srl_list as $document_srl)
|
||||
{
|
||||
$cache_key = 'object:'.$document_srl;
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
$cache_object = $oCacheHandler->get('module_list_documents');
|
||||
foreach ($cache_object as $object){
|
||||
$cache_key_object = $object;
|
||||
$oCacheHandler->delete($cache_key_object);
|
||||
}
|
||||
$oCacheHandler->delete('module_list_documents');
|
||||
}
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
@ -266,7 +282,30 @@
|
|||
**/
|
||||
function deleteModuleDocument($module_srl) {
|
||||
$args->module_srl = $module_srl;
|
||||
$oDocumentModel = &getModel('document');
|
||||
$args->module_srl = $module_srl;
|
||||
$document_list = $oDocumentModel->getDocumentList($args);
|
||||
$documents = $document_list->data;
|
||||
$output = executeQuery('document.deleteModuleDocument', $args);
|
||||
foreach ($documents as $oDocument){
|
||||
$document_srl_list[] = $oDocument->document_srl;
|
||||
}
|
||||
//remove from cache
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport())
|
||||
{
|
||||
foreach($document_srl_list as $document_srl)
|
||||
{
|
||||
$cache_key = 'object:'.$document_srl;
|
||||
$oCacheHandler->delete($cache_key);
|
||||
}
|
||||
$cache_object = $oCacheHandler->get('module_list_documents');
|
||||
foreach ($cache_object as $object){
|
||||
$cache_key_object = $object;
|
||||
$oCacheHandler->delete($cache_key_object);
|
||||
}
|
||||
$oCacheHandler->delete('module_list_documents');
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue