Commit d97eead4 authored by Stan Hu's avatar Stan Hu

Used cached value of project count to reduce DB load

Requires gitlab-org/gitlab-ce!5746

Possible fix for gitlab-com/infrastructure#303
parent a998cab1
......@@ -6,6 +6,7 @@ v 8.11.0 (unreleased)
- [Elastic][Fix] Commit search breaks for some URLs on gitlab-ce project
v 8.10.5 (unreleased)
- Used cached value of project count to reduce DB load
v 8.10.4
- Fix available users in userselect dropdown when there is more than one userselect on the page. !604 (Rik de Groot)
......
......@@ -12,7 +12,7 @@ module Elastic
end
def self.repositories_count
Project.count
Project.cached_count
end
def client_for_indexing
......
......@@ -131,7 +131,7 @@
%h4 Projects
.data
= link_to admin_namespaces_projects_path do
%h1= number_with_delimiter(Project.count)
%h1= number_with_delimiter(Project.cached_count)
%hr
= link_to('New Project', new_project_path, class: "btn btn-new")
.col-sm-4
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment