Skip to content

Introduce ETag caching for merge request discussions

Patrick Bajao requested to merge 367098-mr-discussions-http-cache into master

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

  1. Enable mr_discussions_http_cache feature flag.
  2. Create a MR with comments.
  3. Load the MR page with console open. Check the Network tab. Ensure that "Disable cache" is unchecked.
  4. 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.

Related to #367098 (closed)

Edited by Patrick Bajao

Merge request reports