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:
authorBob Van Landuyt <bob@gitlab.com>2017-03-15 14:03:12 +0300
committerBob Van Landuyt <bob@gitlab.com>2017-03-16 14:31:27 +0300
commit9cca8c0060a2cdcb5ac8b833f913fa3a6b29c18d (patch)
tree4f28afc7ae0fb2d0d220da87f26cfb0c066deb14
parent21c5270a39022d447b63aa0ceb527863e67804fd (diff)
Update the cache key to only include what is required
-rw-r--r--app/views/shared/projects/_project.html.haml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml
index d1af6fe8d8d..119bdb12390 100644
--- a/app/views/shared/projects/_project.html.haml
+++ b/app/views/shared/projects/_project.html.haml
@@ -6,8 +6,8 @@
- css_class = '' unless local_assigns[:css_class]
- 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.pipeline_status) if project.pipeline_status.has_status?
+- cache_key = [project.namespace.cache_key, project.cache_key, controller.controller_name, controller.action_name, current_application_settings.cache_key, 'v2.3']
+- cache_key.push "pipeline-status/#{project.pipeline_status.sha}-#{project.pipeline_status.status}" if project.pipeline_status.has_status?
%li.project-row{ class: css_class }
= cache(cache_key) do