Class: Groups::OpenIssuesCountService

Inherits:
CountService show all
Defined in:
app/services/groups/open_issues_count_service.rb

Overview

Service class for counting and caching the number of open issues of a group.

Constant Summary collapse

PUBLIC_COUNT_KEY =
'group_public_open_issues_count'
TOTAL_COUNT_KEY =
'group_total_open_issues_count'

Constants inherited from CountService

CountService::CACHED_COUNT_THRESHOLD, CountService::EXPIRATION_TIME, CountService::VERSION

Instance Attribute Summary

Attributes inherited from CountService

#group, #user

Instance Method Summary collapse

Methods inherited from CountService

#cache_key, #count, #initialize, #refresh_cache_over_threshold

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Methods inherited from BaseCountService

#cache_key, #cache_options, #count, #count_stored?, #delete_cache, #raw?, #refresh_cache, #uncached_count, #update_cache_for_key

Constructor Details

This class inherits a constructor from Groups::CountService

Instance Method Details

#clear_all_cache_keysObject


9
10
11
12
13
# File 'app/services/groups/open_issues_count_service.rb', line 9

def clear_all_cache_keys
  [cache_key(PUBLIC_COUNT_KEY), cache_key(TOTAL_COUNT_KEY)].each do |key|
    Rails.cache.delete(key)
  end
end