Example #1
0
 /**
  * @param mixed $id
  * @return static
  */
 static function fromId($id)
 {
     if (\Radical\Core\Server::isCLI()) {
         return parent::fromId($id);
     }
     //Check Cache
     $cache_string = static::_idString($id);
     $ret = Table\TableCache::Get($cache_string);
     //If is cached
     if ($ret) {
         return $ret;
     }
     $ret = parent::fromId($id);
     if ($ret) {
         Table\TableCache::Add($ret);
     }
     return $ret;
 }