#385 commentList_{document_srl} object cache 제거

This commit is contained in:
bnu 2014-01-31 02:02:20 +09:00
parent 2f469bb850
commit aa0d6e7cd8
3 changed files with 54 additions and 110 deletions

View file

@ -469,16 +469,6 @@ class commentController extends comment
$output->add('comment_srl', $obj->comment_srl);
//remove from cache
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$oCacheHandler->invalidateGroupKey('commentList_' . $document_srl);
$oCacheHandler->invalidateGroupKey('newestCommentsList');
$oCacheHandler->delete('object:' . $document_srl);
}
return $output;
}
@ -736,14 +726,6 @@ class commentController extends comment
$output->add('comment_srl', $obj->comment_srl);
//remove from cache
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$oCacheHandler->invalidateGroupKey('commentList_' . $obj->document_srl);
$oCacheHandler->invalidateGroupKey('newestCommentsList');
}
return $output;
}
@ -872,16 +854,6 @@ class commentController extends comment
$output->add('document_srl', $document_srl);
//remove from cache
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$oCacheHandler->invalidateGroupKey('commentList_' . $document_srl);
$oCacheHandler->invalidateGroupKey('newestCommentsList');
$oCacheHandler->delete('object:' . $document_srl);
}
return $output;
}
@ -970,14 +942,6 @@ class commentController extends comment
$this->_deleteVotedComments($args);
}
//remove from cache
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$oCacheHandler->invalidateGroupKey('commentList_' . $document_srl);
$oCacheHandler->invalidateGroupKey('newestCommentsList');
}
return $output;
}

View file

@ -445,18 +445,6 @@ class commentModel extends comment
return;
}
// cache controll
$output = false;
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$object_key = 'object:' . $document_srl . '_' . $page . '_' . ($is_admin ? 'Y' : 'N') . '_' . $count;
$cache_key = $oCacheHandler->getGroupKey('commentList_' . $document_srl, $object_key);
$output = $oCacheHandler->get($cache_key);
}
if($output === FALSE)
{
// get the number of comments on the document module
$oDocumentModel = getModel('document');
$columnList = array('document_srl', 'module_srl', 'comment_count');
@ -531,13 +519,6 @@ class commentModel extends comment
}
}
//insert in cache
if($oCacheHandler->isSupport())
{
$oCacheHandler->put($cache_key, $output);
}
}
return $output;
}

View file

@ -453,7 +453,6 @@ class documentAdminController extends document
{
$cache_key_item = 'document_item:'.$document_srl;
$oCacheHandler->delete($cache_key_item);
$oCacheHandler->invalidateGroupKey('commentList_' . $document_srl);
}
}
}