Skip to content

Handle post processed content scenario for MR discussions cache

Patrick Bajao requested to merge 336204-mr-discussions-cache-state into master

What does this MR do?

We cache MR discussions after post processing. Before this fix, we aren't considering the post processing result (e.g. reference state change) which results to stale cache.

This fix adds a Note#post_processed_cache_key that is also added to Discussion#cache_key. This way, when the post processing changes the note's content for a certain user, we will be able to show updated content.

MR discussions cache is still behind a disabled by default feature flag called merge_request_discussion_cache.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #336204

Edited by Dominic Couture

Merge request reports

Loading