Module: Gitlab::EtagCaching::Router::Helpers
Instance Method Summary collapse
- #build_graphql_route(regexp, name, feature_category) ⇒ Object
- #build_rails_route(regexp, name, controller, action_name) ⇒ Object
Instance Method Details
#build_graphql_route(regexp, name, feature_category) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/gitlab/etag_caching/router.rb', line 12 def build_graphql_route(regexp, name, feature_category) EtagCaching::Router::Route.new( router: self, regexp: regexp, name: name, feature_category: feature_category, # This information can be loaded from the graphql query, but is not # included yet # https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/665 caller_id: nil, urgency: Gitlab::EndpointAttributes::DEFAULT_URGENCY ) end |
#build_rails_route(regexp, name, controller, action_name) ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/gitlab/etag_caching/router.rb', line 26 def build_rails_route(regexp, name, controller, action_name) EtagCaching::Router::Route.new( router: self, regexp: regexp, name: name, feature_category: controller.feature_category_for_action(action_name).to_s, caller_id: controller.endpoint_id_for_action(action_name).to_s, urgency: controller.urgency_for_action(action_name) ) end |