From 9cca8c0060a2cdcb5ac8b833f913fa3a6b29c18d Mon Sep 17 00:00:00 2001 From: Bob Van Landuyt Date: Wed, 15 Mar 2017 12:03:12 +0100 Subject: Update the cache key to only include what is required --- app/views/shared/projects/_project.html.haml | 4 ++-- 1 file 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 -- cgit v1.2.1