Use the same way to invalidate cache in EE

Because it doesn't really hurt and could reduce conflicts
Discussion:
5020e1a779 (note_32403646)
This commit is contained in:
Lin Jen-Shin 2017-06-15 21:36:23 +08:00
parent 039c375372
commit c791ca7bc2

View file

@ -236,8 +236,9 @@ class IssuableBaseService < BaseService
) )
if old_assignees != issuable.assignees if old_assignees != issuable.assignees
assignees = old_assignees + issuable.assignees.to_a new_assignees = issuable.assignees.to_a
invalidate_cache_counts(assignees.compact, issuable) affected_assignees = (old_assignees + new_assignees) - (old_assignees & new_assignees)
invalidate_cache_counts(affected_assignees.compact, issuable)
end end
after_update(issuable) after_update(issuable)