diff options
author | Rémy Coutable <remy@rymai.me> | 2016-08-10 12:23:40 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-08-10 14:32:08 +0200 |
commit | 2851cc564255291f48785f3e9857b4b82625c977 (patch) | |
tree | 392d55cc7c9ca9c525878cbfd94714954ecaa182 | |
parent | 813e0bb78868075f30ccde95bd91fad571b6e55e (diff) | |
download | gitlab-ce-2851cc564255291f48785f3e9857b4b82625c977.tar.gz |
Merge branch 'use-cached-project-count-ce' into 'master'
Used cached value of project count to reduce DB load
Following !5746, backport a change from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/637/diffs#diff-2.
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
- [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
See merge request !5754
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/views/admin/dashboard/index.html.haml | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index dae342492b3..bae0f96c52e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.10.5 - Add a data migration to fix some missing timestamps in the members table. !5670 - Revert the "Defend against 'Host' header injection" change in the source NGINX templates. !5706 + - Cache project count for 5 minutes to reduce DB load. !5746 & !5754 v 8.10.4 - Don't close referenced upstream issues from a forked project. diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index a2ac407c159..ab0a409b052 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -108,7 +108,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 |