Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/redis/etag_cache.rb')
-rw-r--r--lib/gitlab/redis/etag_cache.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/gitlab/redis/etag_cache.rb b/lib/gitlab/redis/etag_cache.rb
new file mode 100644
index 00000000000..6aafdc8e518
--- /dev/null
+++ b/lib/gitlab/redis/etag_cache.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Redis
+ class EtagCache < ::Gitlab::Redis::Wrapper
+ class << self
+ def store_name
+ 'Cache'
+ end
+
+ private
+
+ def redis
+ primary_store = ::Redis.new(Gitlab::Redis::Cache.params)
+ secondary_store = ::Redis.new(Gitlab::Redis::SharedState.params)
+
+ MultiStore.new(primary_store, secondary_store, name.demodulize)
+ end
+ end
+ end
+ end
+end