Skip to content

Invalidate cache for max assigned issues count on update

euko requested to merge 381867-invalidate-cache-on-update into master

What does this MR do and why?

When user has many issues assigned, the count query can be slow and heavy. In #381867 (closed), we made a decision to count up to only 100 assigned issues (open) and display 99+. Currently this feature is behind a FF :limit_assigned_issues_count.

While testing I realized I wasn't invalidating the redis cache for the count when a user gets assigned to/unassigned from an issue. This MR fixes this.

How to set up and validate locally

  1. Enable :limit_assigned_issues_count

    Feature.enable(:limit_assigned_issues_count)
  2. Observe the issues count in the navbar:

image

  1. Unassign the user from an issue and check the count is updated (refresh the page!)

image

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by euko

Merge request reports