Commit 36550486 authored by Yorick Peterse's avatar Yorick Peterse Committed by Robert Speicher

Merge branch '18709-use-specific-git-cached-counters' into 'master'

Use Git cached counters on project show page

See merge request !4711
parent 43234742
......@@ -123,6 +123,7 @@ v 8.8.5 (unreleased)
- Fix incremental trace upload API when using multi-byte UTF-8 chars in trace
- Set inverse_of for Project/Service association to reduce the number of queries
- Update tanuki logo highlight/loading colors
- Use Git cached counters for branches and tags on project page
v 8.8.5
- Import GitHub repositories respecting the API rate limit !4166
......
......@@ -243,7 +243,7 @@ class Repository
end
def cache_keys
%i(size branch_names tag_names commit_count
%i(size branch_names tag_names branch_count tag_count commit_count
readme version contribution_guide changelog
license_blob license_key gitignore)
end
......
......@@ -23,10 +23,10 @@
#{'Commit'.pluralize(@project.commit_count)} (#{number_with_delimiter(@project.commit_count)})
%li
= link_to namespace_project_branches_path(@project.namespace, @project) do
#{'Branch'.pluralize(@repository.branch_names.count)} (#{number_with_delimiter(@repository.branch_names.count)})
#{'Branch'.pluralize(@repository.branch_count)} (#{number_with_delimiter(@repository.branch_count)})
%li
= link_to namespace_project_tags_path(@project.namespace, @project) do
#{'Tag'.pluralize(@repository.tag_names.count)} (#{number_with_delimiter(@repository.tag_names.count)})
#{'Tag'.pluralize(@repository.tag_count)} (#{number_with_delimiter(@repository.tag_count)})
- if default_project_view != 'readme' && @repository.readme
%li
......
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