#385 document_item object cache가 매번 갱신되는 문제 수정

This commit is contained in:
bnu 2014-01-31 01:43:23 +09:00
parent 7d16d9d37f
commit 2f469bb850

View file

@ -77,6 +77,7 @@ class documentItem extends Object
if(!$this->document_srl) return; if(!$this->document_srl) return;
$document_item = false; $document_item = false;
$cache_put = false;
// cache controll // cache controll
$oCacheHandler = CacheHandler::getInstance('object'); $oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport()) if($oCacheHandler->isSupport())
@ -101,6 +102,7 @@ class documentItem extends Object
if($document_item === false) if($document_item === false)
{ {
$cache_put = true;
if(!is_object($output->data)) $document_item = new stdClass; if(!is_object($output->data)) $document_item = new stdClass;
else $document_item = $output->data; else $document_item = $output->data;
} }
@ -116,7 +118,7 @@ class documentItem extends Object
$this->setAttribute($document_item, $load_extra_vars); $this->setAttribute($document_item, $load_extra_vars);
//insert in cache //insert in cache
if($this->document_srl && $oCacheHandler->isSupport()) if($cache_put && $oCacheHandler->isSupport())
{ {
$oCacheHandler->put($cache_key, $this); $oCacheHandler->put($cache_key, $this);
} }