summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-06-16 09:01:43 +0000
committerRémy Coutable <remy@rymai.me>2017-06-16 09:01:43 +0000
commit5b7692d055b397527630cad420a3c92c691d7815 (patch)
tree82bb7f378db40e5756242604847f3ce7f60e2afe
parentb541adc561b453cdf4aafb6c89fddbfa8c19a6f1 (diff)
parentc791ca7bc23ebc26a5a39c57f36f9e9b8434fa1f (diff)
downloadgitlab-ce-5b7692d055b397527630cad420a3c92c691d7815.tar.gz
Merge branch 'backport-ee-cache-invalidation-to-ce' into 'master'
Use the same way to invalidate cache from EE See merge request !12187
-rw-r--r--app/services/issuable_base_service.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/services/issuable_base_service.rb b/app/services/issuable_base_service.rb
index a65d6e11c47..cd4d180824f 100644
--- a/app/services/issuable_base_service.rb
+++ b/app/services/issuable_base_service.rb
@@ -236,8 +236,9 @@ class IssuableBaseService < BaseService
)
if old_assignees != issuable.assignees
- assignees = old_assignees + issuable.assignees.to_a
- invalidate_cache_counts(assignees.compact, issuable)
+ new_assignees = issuable.assignees.to_a
+ affected_assignees = (old_assignees + new_assignees) - (old_assignees & new_assignees)
+ invalidate_cache_counts(affected_assignees.compact, issuable)
end
after_update(issuable)