diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2017-11-15 17:47:10 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2017-11-16 16:59:38 +0300 |
commit | 3e561736b2eb4866b75c57c01769586f058a2f8d (patch) | |
tree | 6e136d37d558b14bfbc2505f8b8f564fa96eab6f /app/services/projects/open_issues_count_service.rb | |
parent | 81e94ce1761b48b73be2a8d71938dfe934921e35 (diff) |
Cache the number of user SSH keys
By caching the number of personal SSH keys we reduce the number of
queries necessary on pages such as ProjectsController#show (which can
end up querying this data multiple times).
The cache is refreshed/flushed whenever an SSH key is added, removed, or
when a user is removed.
Diffstat (limited to 'app/services/projects/open_issues_count_service.rb')
-rw-r--r-- | app/services/projects/open_issues_count_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/projects/open_issues_count_service.rb b/app/services/projects/open_issues_count_service.rb index 3c0d186a73c..25de97325e2 100644 --- a/app/services/projects/open_issues_count_service.rb +++ b/app/services/projects/open_issues_count_service.rb @@ -1,7 +1,7 @@ module Projects # Service class for counting and caching the number of open issues of a # project. - class OpenIssuesCountService < CountService + class OpenIssuesCountService < Projects::CountService def relation_for_count # We don't include confidential issues in this number since this would # expose the number of confidential issues to non project members. |