2021-09-30 14:11:31 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Redis
|
|
|
|
class RateLimiting < ::Gitlab::Redis::Wrapper
|
|
|
|
# The data we store on RateLimiting used to be stored on Cache.
|
|
|
|
def self.config_fallback
|
|
|
|
Cache
|
|
|
|
end
|
2021-10-05 14:13:27 -04:00
|
|
|
|
|
|
|
def self.cache_store
|
|
|
|
@cache_store ||= ActiveSupport::Cache::RedisCacheStore.new(redis: pool, namespace: Cache::CACHE_NAMESPACE)
|
|
|
|
end
|
2021-09-30 14:11:31 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|