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}`.
This commit is contained in:
Gabriel Mazetto 2018-11-16 05:52:13 +01:00
parent 19440e6722
commit cb541aef89
1 changed files with 1 additions and 1 deletions

View File

@ -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)