summaryrefslogtreecommitdiff
path: root/app/services/merge_requests
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-07-11 17:12:33 +0100
committerSean McGivern <sean@gitlab.com>2017-07-19 10:21:20 +0100
commit0e488ef70ab2608847423201e957693745f1e3b1 (patch)
tree1b7a329505c1a3026a777258040a3f5be9870561 /app/services/merge_requests
parentb3a588bccaaa078a81e8ce322d75ee167f642e13 (diff)
downloadgitlab-ce-0e488ef70ab2608847423201e957693745f1e3b1.tar.gz
Clear issuable counter caches on updateclear-issuable-count-cache-for-states
When an issuable's state changes, or one is created, we should clear the cache counts for a user's assigned issuables, and also the project-wide caches for this user type.
Diffstat (limited to 'app/services/merge_requests')
-rw-r--r--app/services/merge_requests/close_service.rb2
-rw-r--r--app/services/merge_requests/post_merge_service.rb2
-rw-r--r--app/services/merge_requests/reopen_service.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/services/merge_requests/close_service.rb b/app/services/merge_requests/close_service.rb
index 2ffc989ed71..c0ce01f7523 100644
--- a/app/services/merge_requests/close_service.rb
+++ b/app/services/merge_requests/close_service.rb
@@ -13,7 +13,7 @@ module MergeRequests
notification_service.close_mr(merge_request, current_user)
todo_service.close_merge_request(merge_request, current_user)
execute_hooks(merge_request, 'close')
- invalidate_cache_counts(merge_request.assignees, merge_request)
+ invalidate_cache_counts(merge_request, users: merge_request.assignees)
end
merge_request
diff --git a/app/services/merge_requests/post_merge_service.rb b/app/services/merge_requests/post_merge_service.rb
index f0d998731d7..261a8bfa200 100644
--- a/app/services/merge_requests/post_merge_service.rb
+++ b/app/services/merge_requests/post_merge_service.rb
@@ -13,7 +13,7 @@ module MergeRequests
create_note(merge_request)
notification_service.merge_mr(merge_request, current_user)
execute_hooks(merge_request, 'merge')
- invalidate_cache_counts(merge_request.assignees, merge_request)
+ invalidate_cache_counts(merge_request, users: merge_request.assignees)
end
private
diff --git a/app/services/merge_requests/reopen_service.rb b/app/services/merge_requests/reopen_service.rb
index f2fddf7f345..52f6d511f98 100644
--- a/app/services/merge_requests/reopen_service.rb
+++ b/app/services/merge_requests/reopen_service.rb
@@ -10,7 +10,7 @@ module MergeRequests
execute_hooks(merge_request, 'reopen')
merge_request.reload_diff(current_user)
merge_request.mark_as_unchecked
- invalidate_cache_counts(merge_request.assignees, merge_request)
+ invalidate_cache_counts(merge_request, users: merge_request.assignees)
end
merge_request