Some caching improvements
This commit is contained in:
@@ -18,7 +18,7 @@ class Controller_NODE extends Controller_TemplateDefault {
|
||||
$no = ORM::factory('node');
|
||||
$output = '';
|
||||
|
||||
$output .= sprintf(_('This server has <b>%s</b> defined nodes.'),$no->cached(0)->count_all());
|
||||
$output .= sprintf(_('This server has <b>%s</b> defined nodes.'),$no->count_all());
|
||||
$output .= '<br/>';
|
||||
$output .= '<br/>';
|
||||
|
||||
|
@@ -25,12 +25,12 @@ class ORMTSM extends ORM {
|
||||
protected $_formated = FALSE;
|
||||
protected $_formats = array();
|
||||
|
||||
public function __construct($id = NULL) {
|
||||
parent::__construct($id);
|
||||
|
||||
protected function _load_result($multiple = FALSE) {
|
||||
// We'll cache our query results
|
||||
if ($c = $this->_db->caching($this->_table_name))
|
||||
$this->cached($c);
|
||||
$this->_db_builder->cached($c);
|
||||
|
||||
return parent::_load_result($multiple);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user