summaryrefslogtreecommitdiff
path: root/app/views/shared/projects
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-03-14 13:07:43 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-03-14 13:07:43 +0000
commit270e15f1538fe2b325dbb9bdcf58b622c2a4e86d (patch)
tree178ab419ac8f9355668297e3753282fcaf8ef248 /app/views/shared/projects
parentb3eda944454cb180cdefb8ddff35fdeb729e3ed5 (diff)
parent6bffc17f7d04f6ecd99d896ed299060724032a3b (diff)
downloadgitlab-ce-270e15f1538fe2b325dbb9bdcf58b622c2a4e86d.tar.gz
Merge branch 'fix/gb/dashboard-commit-status-caching' into 'master'
Improve fragment caching rules at projects dashboard Closes #28364 See merge request !9895
Diffstat (limited to 'app/views/shared/projects')
-rw-r--r--app/views/shared/projects/_project.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml
index 4a27965754d..7e9fb7bb4d3 100644
--- a/app/views/shared/projects/_project.html.haml
+++ b/app/views/shared/projects/_project.html.haml
@@ -7,7 +7,7 @@
- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true && project.commit
- css_class += " no-description" if project.description.blank? && !show_last_commit_as_description
- cache_key = [project.namespace, project, controller.controller_name, controller.action_name, current_application_settings, 'v2.3']
-- cache_key.push(project.commit.status) if project.commit.try(:status)
+- cache_key.push(project.commit&.sha, project.commit&.status)
%li.project-row{ class: css_class }
= cache(cache_key) do