提交 df663907 编写于 作者: P Paco Guzman

Get ref_names from branch_names/tag_names cached

上级 208b18c9
......@@ -133,6 +133,7 @@ v 8.9.0 (unreleased)
- Use Git cached counters for branches and tags on project page
- Filter parameters for request_uri value on instrumented transactions.
- 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
- Ensure Todos counters doesn't count Todos for projects pending delete
......
......@@ -191,6 +191,10 @@ class Repository
end
end
def ref_names
branch_names + tag_names
end
def branch_names
@branch_names ||= cache.fetch(:branch_names) { branches.map(&:name) }
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册