diff --git a/application/classes/Model/NODE.php b/application/classes/Model/NODE.php index 3abf742..eff6320 100644 --- a/application/classes/Model/NODE.php +++ b/application/classes/Model/NODE.php @@ -125,13 +125,8 @@ class Model_NODE extends ORM_TSM { $c = Kohana::$config->load('config')->cache; if (is_null($result = Cache::instance($c)->get($k))) { - $result = array(); - - // In the interest of performance, we load all the records and get PHP to process it. - // Our ORM caching we reduce the hit on TSM. - foreach (ORM::factory('ACTLOG')->find_all() as $o) - if ($o->NODENAME == $this->NODE_NAME) - array_push($result,$o); + // We cant load all records here, like we do with the others, there is too much data! + $result = $this->ACTLOG->find_all(); // @todo Cache time should be configurble Cache::instance($c)->set($k,$result,300);