mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 22:33:10 +09:00
cache improvements 2
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9142 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
aa1f0ceddc
commit
054a2e7e81
6 changed files with 188 additions and 38 deletions
|
|
@ -27,10 +27,19 @@
|
|||
|
||||
function _loadFromDB($load_extra_vars = true) {
|
||||
if(!$this->document_srl) return;
|
||||
|
||||
$args->document_srl = $this->document_srl;
|
||||
$output = executeQuery('document.getDocument', $args, $this->columnList);
|
||||
|
||||
|
||||
// cache controll
|
||||
$oCacheHandler = &CacheHandler::getInstance('object');
|
||||
if($oCacheHandler->isSupport()){
|
||||
$cache_key = 'object_document_item:'.$this->document_srl;
|
||||
$output = $oCacheHandler->get($cache_key);
|
||||
}
|
||||
if(!$output) {
|
||||
$args->document_srl = $this->document_srl;
|
||||
$output = executeQuery('document.getDocument', $args, $this->columnList);
|
||||
//insert in cache
|
||||
if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key,$output);
|
||||
}
|
||||
$this->setAttribute($output->data,$load_extra_vars);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue