diff options
Diffstat (limited to 'app/services/groups/open_issues_count_service.rb')
-rw-r--r-- | app/services/groups/open_issues_count_service.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/services/groups/open_issues_count_service.rb b/app/services/groups/open_issues_count_service.rb index ef787a04315..17cf3d38987 100644 --- a/app/services/groups/open_issues_count_service.rb +++ b/app/services/groups/open_issues_count_service.rb @@ -6,6 +6,12 @@ module Groups PUBLIC_COUNT_KEY = 'group_public_open_issues_count' TOTAL_COUNT_KEY = 'group_total_open_issues_count' + def clear_all_cache_keys + [cache_key(PUBLIC_COUNT_KEY), cache_key(TOTAL_COUNT_KEY)].each do |key| + Rails.cache.delete(key) + end + end + private def cache_key_name @@ -23,7 +29,14 @@ module Groups end def relation_for_count - IssuesFinder.new(user, group_id: group.id, state: 'opened', non_archived: true, include_subgroups: true, public_only: public_only?).execute + IssuesFinder.new( + user, + group_id: group.id, + state: 'opened', + non_archived: true, + include_subgroups: true, + public_only: public_only? + ).execute end def issuable_key |