Commit 12b0712e authored by Robert May's avatar Robert May

Remove custom cache context for now

parent a35c3205
--- ---
name: api_caching_merge_requests name: api_caching_merge_requests
introduced_by_url: introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61067
rollout_issue_url: rollout_issue_url:
milestone: '13.12' milestone: '13.12'
type: development type: development
......
...@@ -202,18 +202,6 @@ module API ...@@ -202,18 +202,6 @@ module API
options[:project] = user_project options[:project] = user_project
if Feature.enabled?(:api_caching_merge_requests, user_project, type: :development, default_enabled: :yaml) if Feature.enabled?(:api_caching_merge_requests, user_project, type: :development, default_enabled: :yaml)
# User-specific context in the simple MR entity is limited to
# email address exposure, which we need to check and combine
# into the cache context
options[:cache_context] = proc do |mr|
[
options.values_at(:render_html, :with_labels_details, :skip_merge_status_recheck),
mr.author.managed_by?(current_user),
mr.assignees.map { |u| u.managed_by?(current_user) },
[mr.metrics&.merged_by, mr.metrics&.latest_closed_by].compact.map { |u| u.managed_by?(current_user) }
]
end
present_cached merge_requests, **options present_cached merge_requests, **options
else else
present merge_requests, options present merge_requests, options
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment