Commit cb541aef authored by Gabriel Mazetto's avatar Gabriel Mazetto

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}`.
parent 19440e67
...@@ -42,7 +42,7 @@ module Gitlab ...@@ -42,7 +42,7 @@ module Gitlab
end end
def self.cache_key_for_project(project) 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 end
def self.update_for_pipeline(pipeline) def self.update_for_pipeline(pipeline)
......
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