summaryrefslogtreecommitdiff
path: root/lib/gitlab/set_cache.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 09:55:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 09:55:51 +0000
commite8d2c2579383897a1dd7f9debd359abe8ae8373d (patch)
treec42be41678c2586d49a75cabce89322082698334 /lib/gitlab/set_cache.rb
parentfc845b37ec3a90aaa719975f607740c22ba6a113 (diff)
downloadgitlab-ce-e8d2c2579383897a1dd7f9debd359abe8ae8373d.tar.gz
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'lib/gitlab/set_cache.rb')
-rw-r--r--lib/gitlab/set_cache.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/set_cache.rb b/lib/gitlab/set_cache.rb
index 30cd63e80c0..9fc7a44ec99 100644
--- a/lib/gitlab/set_cache.rb
+++ b/lib/gitlab/set_cache.rb
@@ -10,12 +10,12 @@ module Gitlab
@expires_in = expires_in
end
- def cache_key(key)
+ # NOTE Remove as part of https://gitlab.com/gitlab-org/gitlab/-/issues/331319
+ def old_cache_key(key)
"#{key}:set"
end
- # NOTE Remove as part of https://gitlab.com/gitlab-org/gitlab/-/issues/331319
- def new_cache_key(key)
+ def cache_key(key)
"#{cache_namespace}:#{key}:set"
end
@@ -25,7 +25,7 @@ module Gitlab
with do |redis|
keys_to_expire = keys.map { |key| cache_key(key) }
- keys_to_expire += keys.map { |key| new_cache_key(key) } # NOTE Remove as part of #331319
+ keys_to_expire += keys.map { |key| old_cache_key(key) } # NOTE Remove as part of #331319
Gitlab::Instrumentation::RedisClusterValidator.allow_cross_slot_commands do
redis.unlink(*keys_to_expire)