public static function getPostProperties($id) { if (isset(static::$properties[$id])) { return static::$properties[$id]; } $list = PostPropertyRel::join(PostProperty::getTableName(), PostProperty::getField('id'), '=', PostPropertyRel::getField('post_property_id'))->where(PostPropertyRel::getField('post_id'), $id)->remember(SettingsModel::one('cachelife'))->get(); $names = array(); foreach ($list as $item) { $names[] = $item->key; } static::$properties[$id] = $names; return $names; }