Introduce ETag caching for merge request discussions
What does this MR do and why?
This enables HTTP caching using ETag since we're experiencing latency spikes on our redis cache. This is behind the mr_discussions_http_cache
feature flag.
Disabling the redis cache is behind a feature flag called disabled_mr_discussions_redis_cache
so we can easily test the effects of:
- having HTTP cache and Redis cache
- having HTTP cache only
How to set up and validate locally
- Enable
mr_discussions_http_cache
feature flag. - Create a MR with comments.
- Load the MR page with console open. Check the Network tab. Ensure that "Disable cache" is unchecked.
- Reload the page and should see requests for
discussions.json
return 304.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #367098 (closed)
Edited by Patrick Bajao