'ASC', ); /** * Get all the ACTIVITIY LOG for this SERVER */ private function _actlog() { Log::instance()->add(LOG::DEBUG,'ENTER :method',array(':method'=>__METHOD__)); $k = sprintf('%s-%s',__METHOD__,$this->SERVER_NAME); $c = Kohana::$config->load('config')->cache; if (is_null($result = Cache::instance($c)->get($k))) { // We cant load all records here, like we do with the others, there is too much data! // Due to the volume of data that could be retrieved, we'll only get the last tsmserveractlog days $result = ORM::factory('ACTLOG') ->ExcludeSERVER() ->where('ORIGINATOR','IN',array('SERVER')) ->and_where('DATE_TIME','>=',date('Y-m-d H:00:00',time()-3600*Kohana::$config->load('config')->tsmserveractlog)) ->find_all(); // @todo Cache time should be configurble Cache::instance($c)->set($k,$result,300); } Log::instance()->add(LOG::DEBUG,'EXIT :method',array(':method'=>__METHOD__)); return $result; } public function activity() { return $this->_actlog(); } } ?>