Some caching improvements
This commit is contained in:
parent
d29b29fa07
commit
6aabf025ca
@ -130,7 +130,7 @@ Route::set('default/media', 'media(/<file>)', array('file' => '.+'))
|
|||||||
* Set the routes. Each route must have a minimum of a name, a URI and a set of
|
* Set the routes. Each route must have a minimum of a name, a URI and a set of
|
||||||
* defaults for the URI.
|
* defaults for the URI.
|
||||||
*/
|
*/
|
||||||
Route::set('default', '(<controller>(/<action>(/<id>)))', array('id' => '[a-zA-Z0-9_.]+'))
|
Route::set('default', '(<controller>(/<action>(/<id>)))', array('id' => '[a-zA-Z0-9_.-]+'))
|
||||||
->defaults(array(
|
->defaults(array(
|
||||||
'controller' => 'welcome',
|
'controller' => 'welcome',
|
||||||
'action' => 'index',
|
'action' => 'index',
|
||||||
|
@ -18,7 +18,7 @@ class Controller_NODE extends Controller_TemplateDefault {
|
|||||||
$no = ORM::factory('node');
|
$no = ORM::factory('node');
|
||||||
$output = '';
|
$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/>';
|
||||||
$output .= '<br/>';
|
$output .= '<br/>';
|
||||||
|
|
||||||
|
@ -25,12 +25,12 @@ class ORMTSM extends ORM {
|
|||||||
protected $_formated = FALSE;
|
protected $_formated = FALSE;
|
||||||
protected $_formats = array();
|
protected $_formats = array();
|
||||||
|
|
||||||
public function __construct($id = NULL) {
|
protected function _load_result($multiple = FALSE) {
|
||||||
parent::__construct($id);
|
|
||||||
|
|
||||||
// We'll cache our query results
|
// We'll cache our query results
|
||||||
if ($c = $this->_db->caching($this->_table_name))
|
if ($c = $this->_db->caching($this->_table_name))
|
||||||
$this->cached($c);
|
$this->_db_builder->cached($c);
|
||||||
|
|
||||||
|
return parent::_load_result($multiple);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,6 +44,7 @@ return array
|
|||||||
'CLIENT_SCHEDULES' => 1200,
|
'CLIENT_SCHEDULES' => 1200,
|
||||||
'CLIENTOPTS' => 1200,
|
'CLIENTOPTS' => 1200,
|
||||||
'DEVCLASSES' => 1200,
|
'DEVCLASSES' => 1200,
|
||||||
|
'DOMAINS' => 1200,
|
||||||
'EVENTS' => 1200,
|
'EVENTS' => 1200,
|
||||||
'FILESPACES' => 1200,
|
'FILESPACES' => 1200,
|
||||||
'MGMTCLASSES' => 1200,
|
'MGMTCLASSES' => 1200,
|
||||||
@ -51,7 +52,7 @@ return array
|
|||||||
'OCCUPANCY' => 1200,
|
'OCCUPANCY' => 1200,
|
||||||
'SCHEMA' => 604800,
|
'SCHEMA' => 604800,
|
||||||
'STGPOOLS' => 1200,
|
'STGPOOLS' => 1200,
|
||||||
'SUMMARY' => 60,
|
'SUMMARY' => 180,
|
||||||
'VOLUMES' => 1200,
|
'VOLUMES' => 1200,
|
||||||
'VOLUMEUSAGE' => 1200,
|
'VOLUMEUSAGE' => 1200,
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user