diff options
author | Mario de la Ossa <mariodelaossa@gmail.com> | 2019-03-19 13:56:03 -0600 |
---|---|---|
committer | Mario de la Ossa <mariodelaossa@gmail.com> | 2019-03-19 14:17:16 -0600 |
commit | 2a520b1ce75f2f06d9780f9b6f17893d9f775422 (patch) | |
tree | 21893582a6aa91ffb75aea035f60abf2d086fdbc /app/helpers | |
parent | 74ebeebbcdbe5a996610fa02711f0563b4a774fa (diff) | |
download | gitlab-ce-2a520b1ce75f2f06d9780f9b6f17893d9f775422.tar.gz |
Avoid loading pipeline status in project search
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/projects_helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 5496aa4908c..f2abb241753 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -169,7 +169,7 @@ module ProjectsHelper translation.html_safe end - def project_list_cache_key(project) + def project_list_cache_key(project, pipeline_status: true) key = [ project.route.cache_key, project.cache_key, @@ -179,10 +179,11 @@ module ProjectsHelper Gitlab::CurrentSettings.cache_key, "cross-project:#{can?(current_user, :read_cross_project)}", max_project_member_access_cache_key(project), + pipeline_status, 'v2.6' ] - key << pipeline_status_cache_key(project.pipeline_status) if project.pipeline_status.has_status? + key << pipeline_status_cache_key(project.pipeline_status) if pipeline_status && project.pipeline_status.has_status? key end |