Commit 9cca8c00 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Update the cache key to only include what is required

parent 21c5270a
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
- css_class = '' unless local_assigns[:css_class] - css_class = '' unless local_assigns[:css_class]
- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true && project.commit - 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 - 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 = [project.namespace.cache_key, project.cache_key, controller.controller_name, controller.action_name, current_application_settings.cache_key, 'v2.3']
- cache_key.push(project.pipeline_status) if project.pipeline_status.has_status? - 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 } %li.project-row{ class: css_class }
= cache(cache_key) do = cache(cache_key) do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment