Class: Projects::ForksCountService
- Inherits:
-
CountService
- Object
- BaseCountService
- CountService
- Projects::ForksCountService
- Defined in:
- app/services/projects/forks_count_service.rb
Overview
Service class for getting and caching the number of forks of a project.
Constant Summary
Constants inherited from CountService
Instance Attribute Summary
Attributes inherited from CountService
Class Method Summary collapse
-
.query(project_ids) ⇒ Object
rubocop: disable CodeReuse/ActiveRecord.
Instance Method Summary collapse
Methods inherited from CountService
#cache_key, #initialize, #relation_for_count
Methods inherited from BaseCountService
#cache_key, #cache_options, #count, #count_stored?, #delete_cache, #raw?, #refresh_cache, #relation_for_count, #uncached_count, #update_cache_for_key
Constructor Details
This class inherits a constructor from Projects::CountService
Class Method Details
.query(project_ids) ⇒ Object
rubocop: disable CodeReuse/ActiveRecord
11 12 13 |
# File 'app/services/projects/forks_count_service.rb', line 11 def self.query(project_ids) ForkNetworkMember.where(forked_from_project: project_ids) end |
Instance Method Details
#cache_key_name ⇒ Object
6 7 8 |
# File 'app/services/projects/forks_count_service.rb', line 6 def cache_key_name 'forks_count' end |