Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-03-08 19:38:23 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2016-03-08 20:19:40 +0300
commitcb5a5ba09588af866aed595d960755bf4ced4483 (patch)
tree138d5dd36460bf07ed2665f42c8a8d9534ae821e /app/views/projects/branches
parent149a52b10f5d5715ad5868add8ae0d4d6389d46d (diff)
Cache & flush tag/branch counts
The methods used for this are Repository#tag_count and Repository#branch_count which cache their output in Redis as well as memoizing it in an instance variable. Both methods have a corresponding methods/hooks to flush the caches at the right time.
Diffstat (limited to 'app/views/projects/branches')
-rw-r--r--app/views/projects/branches/destroy.js.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/branches/destroy.js.haml b/app/views/projects/branches/destroy.js.haml
index 882a4d0c5e2..a21ddaf4930 100644
--- a/app/views/projects/branches/destroy.js.haml
+++ b/app/views/projects/branches/destroy.js.haml
@@ -1 +1 @@
-$('.js-totalbranch-count').html("#{@repository.branches.size}")
+$('.js-totalbranch-count').html("#{@repository.branch_count}")