public static function getByID($akID) { $ak = new UserAttributeKey(); $ak->load($akID); if ($ak->getAttributeKeyID() > 0) { return $ak; } }
public static function getByID($akID) { $ak = Cache::get('attribute_key', $akID); if (is_object($ak)) { return $ak; } $ak = new UserAttributeKey(); $ak->load($akID); if ($ak->getAttributeKeyID() > 0) { Cache::set('attribute_key', $akID, $ak); return $ak; } }