Commit 13c904f0 authored by Etienne Baqué's avatar Etienne Baqué

Merge branch '335799-remove-merge-request-discussion-cache-ff' into 'master'

Enable merge requests discussions cache

See merge request gitlab-org/gitlab!71635
parents da8c4a76 de3fa103
......@@ -158,7 +158,7 @@ module IssuableActions
discussions = Discussion.build_collection(notes, issuable)
if issuable.is_a?(MergeRequest) && Feature.enabled?(:merge_request_discussion_cache, issuable.target_project, default_enabled: :yaml)
if issuable.is_a?(MergeRequest)
cache_context = [current_user&.cache_key, project.team.human_max_access(current_user&.id)].join(':')
render_cached(discussions, with: discussion_serializer, cache_context: -> (_) { cache_context }, context: self)
......
---
name: merge_request_discussion_cache
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64688
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/335799
milestone: '14.1'
type: development
group: group::code review
default_enabled: false
......@@ -251,16 +251,6 @@ RSpec.describe 'merge requests discussions' do
let(:changed_notes) { [first_note, second_note] }
end
end
context 'when merge_request_discussion_cache is disabled' do
before do
stub_feature_flags(merge_request_discussion_cache: false)
end
it_behaves_like 'cache miss' do
let(:changed_notes) { [first_note, second_note] }
end
end
end
end
end
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