Skip to content
Snippets Groups Projects
Commit 27962c00 authored by Marc Shaw's avatar Marc Shaw :two:
Browse files

Remove the feature flag remove_branch_caching_feature_flag

MR: gitlab.com/gitlab-org/gitlab/-/merge_requests/96748

Changelog: performance
parent 98d8e33e
No related branches found
No related tags found
2 merge requests!97251Synchronize ruby3 branch manually due to conflicts,!96748Remove the feature flag remove_branch_caching_feature_flag
---
name: api_caching_branches
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61157
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/330371
milestone: '13.12'
type: development
group: group::source code
default_enabled: false
......@@ -52,25 +52,15 @@ class Branches < ::API::Base
merged_branch_names = repository.merged_branch_names(branches.map(&:name))
if Feature.enabled?(:api_caching_branches, user_project, type: :development)
present_cached(
branches,
with: Entities::Branch,
current_user: current_user,
project: user_project,
merged_branch_names: merged_branch_names,
expires_in: 10.minutes,
cache_context: -> (branch) { [current_user&.cache_key, merged_branch_names.include?(branch.name)] }
)
else
present(
branches,
with: Entities::Branch,
current_user: current_user,
project: user_project,
merged_branch_names: merged_branch_names
)
end
present_cached(
branches,
with: Entities::Branch,
current_user: current_user,
project: user_project,
merged_branch_names: merged_branch_names,
expires_in: 10.minutes,
cache_context: -> (branch) { [current_user&.cache_key, merged_branch_names.include?(branch.name)] }
)
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment