diff --git a/config/application.rb b/config/application.rb index 86db333b7f6..5a538883d84 100644 --- a/config/application.rb +++ b/config/application.rb @@ -305,7 +305,13 @@ class Application < Rails::Application if (rails_cache_settings && rails_cache_settings[:type] == 'redis') options = [:redis_cache_store] redis_urls = Array.wrap(rails_cache_settings[:urls]) - options << { namespace: 'foreman', url: redis_urls }.merge(rails_cache_settings[:options] || {}) + + options << { + namespace: 'foreman', + url: redis_urls, + reconnect_attempts: ::Redis::Client::DEFAULTS[:reconnect_attempts], + }.merge(rails_cache_settings[:options] || {}) + config.cache_store = options Foreman::Logging.logger('app').info "Rails cache backend: Redis" else