summaryrefslogtreecommitdiff
path: root/lib/gitlab/pages/cache_control.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/pages/cache_control.rb')
-rw-r--r--lib/gitlab/pages/cache_control.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/gitlab/pages/cache_control.rb b/lib/gitlab/pages/cache_control.rb
index be39e52b342..a24d958b7e5 100644
--- a/lib/gitlab/pages/cache_control.rb
+++ b/lib/gitlab/pages/cache_control.rb
@@ -16,8 +16,8 @@ module Gitlab
PAYLOAD_CACHE_KEY = '%{settings_cache_key}_%{settings_hash}'
class << self
- def for_project(project_id)
- new(type: :project, id: project_id)
+ def for_domain(domain_id)
+ new(type: :domain, id: domain_id)
end
def for_namespace(namespace_id)
@@ -26,7 +26,7 @@ module Gitlab
end
def initialize(type:, id:)
- raise(ArgumentError, "type must be :namespace or :project") unless %i[namespace project].include?(type)
+ raise(ArgumentError, "type must be :namespace or :domain") unless %i[namespace domain].include?(type)
@type = type
@id = id
@@ -50,7 +50,9 @@ module Gitlab
.map { |hash| payload_cache_key_for(hash) }
.push(settings_cache_key)
- Rails.cache.delete_multi(keys)
+ Gitlab::Instrumentation::RedisClusterValidator.allow_cross_slot_commands do
+ Rails.cache.delete_multi(keys)
+ end
end
private