diff options
Diffstat (limited to 'lib/gitlab/redis/repository_cache.rb')
-rw-r--r-- | lib/gitlab/redis/repository_cache.rb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/gitlab/redis/repository_cache.rb b/lib/gitlab/redis/repository_cache.rb index 8bfbfcfea60..6c7bc8c41d5 100644 --- a/lib/gitlab/redis/repository_cache.rb +++ b/lib/gitlab/redis/repository_cache.rb @@ -14,19 +14,10 @@ module Gitlab redis: pool, compress: Gitlab::Utils.to_boolean(ENV.fetch('ENABLE_REDIS_CACHE_COMPRESSION', '1')), namespace: Cache::CACHE_NAMESPACE, - # Cache should not grow forever - expires_in: ENV.fetch('GITLAB_RAILS_CACHE_DEFAULT_TTL_SECONDS', 8.hours).to_i + expires_in: Cache.default_ttl_seconds, + error_handler: ::Gitlab::Redis::ERROR_HANDLER ) end - - private - - def redis - primary_store = ::Redis.new(params) - secondary_store = ::Redis.new(config_fallback.params) - - MultiStore.new(primary_store, secondary_store, store_name) - end end end end |