Class: Groups::OpenIssuesCountService
- Inherits:
-
CountService
- Object
- BaseCountService
- CountService
- Groups::OpenIssuesCountService
- Extended by:
- Gitlab::Utils::Override
- 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
Instance Method Summary collapse
- #clear_all_cache_keys ⇒ Object
-
#initialize(*args, fast_timeout: false) ⇒ OpenIssuesCountService
constructor
A new instance of OpenIssuesCountService.
Methods included from Gitlab::Utils::Override
extended, extensions, included, method_added, override, prepended, queue_verification, verify!
Methods inherited from CountService
#cache_key, #count, #refresh_cache_over_threshold
Methods inherited from BaseCountService
#cache_key, #cache_options, #count, #count_stored?, #delete_cache, #raw?, #refresh_cache, #update_cache_for_key
Constructor Details
#initialize(*args, fast_timeout: false) ⇒ OpenIssuesCountService
Returns a new instance of OpenIssuesCountService.
12 13 14 15 16 |
# File 'app/services/groups/open_issues_count_service.rb', line 12 def initialize(*args, fast_timeout: false) super(*args) @fast_timeout = fast_timeout end |
Instance Method Details
#clear_all_cache_keys ⇒ Object
18 19 20 21 22 |
# File 'app/services/groups/open_issues_count_service.rb', line 18 def clear_all_cache_keys [cache_key(PUBLIC_COUNT_KEY), cache_key(TOTAL_COUNT_KEY)].each do |key| Rails.cache.delete(key) end end |