public static function getByID($akID) { $cak = Cache::get('attribute_key', $akID); if (is_object($cak)) { return $cak; } $ak = new CollectionAttributeKey(); $ak->load($akID); if ($ak->getAttributeKeyID() > 0) { Cache::set('attribute_key', $akID, $ak); return $ak; } }
public static function getByHandle($akHandle) { $ak = CacheLocal::getEntry('collection_attribute_key_by_handle', $akHandle); if (is_object($ak)) { return $ak; } else if ($ak == -1) { return false; } $ak = new CollectionAttributeKey(); $ak->load($akHandle, 'akHandle'); if ($ak->getAttributeKeyID() < 1) { $ak = -1; } CacheLocal::set('collection_attribute_key_by_handle', $akHandle, $ak); if ($ak === -1) { return false; } return $ak; }