public static function getById($id)
{
$cacheKey = Unit\Dao::TABLE_NAME . "_" . $id;
try {
$unit = \Zend_Registry::get($cacheKey);
} catch (\Exception $e) {
try {
$unit = new self();
$unit->getDao()->getById($id);
\Zend_Registry::set($cacheKey, $unit);
} catch (\Exception $ex) {
Logger::debug($ex->getMessage());
return null;
}
}
return $unit;
}