summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2018-11-16 05:52:13 +0100
committerGabriel Mazetto <brodock@gmail.com>2018-11-16 16:22:53 +0100
commitcb541aef892ca47ee01e2e71fb5edaa227cd7927 (patch)
treeb47d78257e97ab4805f8e0a2798de4a356455574
parent19440e67225d41ff821a9e31f47d60fe7a1718c2 (diff)
downloadgitlab-ce-cb541aef892ca47ee01e2e71fb5edaa227cd7927.tar.gz
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}`.
-rw-r--r--lib/gitlab/cache/ci/project_pipeline_status.rb2
1 files changed, 1 insertions, 1 deletions
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)