Commit df663907 authored by Paco Guzman's avatar Paco Guzman

Get ref_names from branch_names/tag_names cached

parent 208b18c9
...@@ -133,6 +133,7 @@ v 8.9.0 (unreleased) ...@@ -133,6 +133,7 @@ v 8.9.0 (unreleased)
- Use Git cached counters for branches and tags on project page - Use Git cached counters for branches and tags on project page
- Filter parameters for request_uri value on instrumented transactions. - Filter parameters for request_uri value on instrumented transactions.
- Remove duplicated keys add UNIQUE index to keys fingerprint column - Remove duplicated keys add UNIQUE index to keys fingerprint column
- ExtractsPath get ref_names from repository cache, if not there access git.
- Cache user todo counts from TodoService - Cache user todo counts from TodoService
- Ensure Todos counters doesn't count Todos for projects pending delete - Ensure Todos counters doesn't count Todos for projects pending delete
......
...@@ -191,6 +191,10 @@ class Repository ...@@ -191,6 +191,10 @@ class Repository
end end
end end
def ref_names
branch_names + tag_names
end
def branch_names def branch_names
@branch_names ||= cache.fetch(:branch_names) { branches.map(&:name) } @branch_names ||= cache.fetch(:branch_names) { branches.map(&:name) }
end end
......
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