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

etag_cache.rb « redis « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6aafdc8e518ee9b2e1f50ce447436175cd90f15a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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