Use consistent cache naming for set caches
Cache key naming
This changes the RepositorySetCache
cache key naming scheme to add the cache:gitlab
namespace to the front of the cache key.
This is in line with how other caches work & aims to keep our cache naming consistent and predictable, which make them easier to work with (such as clearing caches). Redis instances used by GitLab could in theory be used by other applications & so adding a cache:gitlab
prefix to all caches make it clear what the cache is for.
Old key | New key |
---|---|
branch_names:root/autodevops-deploy-test:21:set |
cache:gitlab:branch_names:root/autodevops-deploy-test:21:set |
Improved usage of rake task
As a result of the naming change, the cache:clear:redis
rake task is now more useful and will delete the RepositorySetCache
entries which were previously unable to be deleted easily.
Rollout plan
From !61306 (comment 577512702)
- a MR which adds expiry of the new key format, retaining write and read of the old format.
- Another MR, in the subsequent milestone, that adds write and read in the new format, and keeps expiry of old format.
- A final MR at a later milestone, that removes references to the old format.
Edited by Sean Arnold