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/rate_limiting.rb')
-rw-r--r--lib/gitlab/redis/rate_limiting.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/gitlab/redis/rate_limiting.rb b/lib/gitlab/redis/rate_limiting.rb
new file mode 100644
index 00000000000..4ae1d55e4ce
--- /dev/null
+++ b/lib/gitlab/redis/rate_limiting.rb
@@ -0,0 +1,16 @@
+# 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
+
+ def self.cache_store
+ @cache_store ||= ActiveSupport::Cache::RedisCacheStore.new(redis: pool, namespace: Cache::CACHE_NAMESPACE)
+ end
+ end
+ end
+end