From cb541aef892ca47ee01e2e71fb5edaa227cd7927 Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Fri, 16 Nov 2018 05:52:13 +0100 Subject: Change project pipeline status cache key to follow project convention Old cache key was: `projects/#{id}/pipeline_status/#{sha}` New one is: `project:#{id}:pipeline_status:#{sha}` This allows to delete any project related key just by scanning for: `project:#{id}`. --- lib/gitlab/cache/ci/project_pipeline_status.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gitlab/cache/ci/project_pipeline_status.rb b/lib/gitlab/cache/ci/project_pipeline_status.rb index dfbb83f7bb9..78b0eaac8cd 100644 --- a/lib/gitlab/cache/ci/project_pipeline_status.rb +++ b/lib/gitlab/cache/ci/project_pipeline_status.rb @@ -42,7 +42,7 @@ module Gitlab end def self.cache_key_for_project(project) - "#{Gitlab::Redis::Cache::CACHE_NAMESPACE}:projects/#{project.id}/pipeline_status/#{project.commit&.sha}" + "#{Gitlab::Redis::Cache::CACHE_NAMESPACE}:project:#{project.id}:pipeline_status:#{project.commit&.sha}" end def self.update_for_pipeline(pipeline) -- cgit v1.2.1