Implement caching on discussions.json for merge requests
What does this MR do?
This is improve performance of discussions.json by caching.
Locally, when request hits a warm cache, it shows improvement from 10s to 1.5s for 100+ discussions. For 100+ discussions, each request reads 203569
bytes.
This is implemented behind merge_request_discussion_cache
feature flag and only works for merge requests. This is to see how it is going to perform on production and to ensure we can turn the feature off if there are unexpected bugs.
Does this MR meet the acceptance criteria?
Conformity
-
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.)
Related to #332967 (closed)
Edited by Patrick Bajao