diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2017-03-15 12:03:12 +0100 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-03-16 12:31:27 +0100 |
commit | 9cca8c0060a2cdcb5ac8b833f913fa3a6b29c18d (patch) | |
tree | 4f28afc7ae0fb2d0d220da87f26cfb0c066deb14 | |
parent | 21c5270a39022d447b63aa0ceb527863e67804fd (diff) | |
download | gitlab-ce-9cca8c0060a2cdcb5ac8b833f913fa3a6b29c18d.tar.gz |
Update the cache key to only include what is required
-rw-r--r-- | app/views/shared/projects/_project.html.haml | 4 |
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 |