summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 21:07:52 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 21:07:52 +0000
commit03a70b84edfb86bc27f9234e1f1d157d3a33c555 (patch)
treed8df46fee3e5a97d3b9dbd7d2e69ccc9e3601de1 /config
parent165beade336f9049f95db3944b1c5c00a1e952cf (diff)
downloadgitlab-ce-03a70b84edfb86bc27f9234e1f1d157d3a33c555.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r--config/application.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/config/application.rb b/config/application.rb
index 8cd707c9e15..5c4eb8f5dff 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -258,18 +258,11 @@ module Gitlab
# Use caching across all environments
# Full list of options:
# https://api.rubyonrails.org/classes/ActiveSupport/Cache/RedisCacheStore.html#method-c-new
- caching_config_hash = Gitlab::Redis::Cache.params
+ caching_config_hash = {}
+ caching_config_hash[:redis] = Gitlab::Redis::Cache.pool
caching_config_hash[:compress] = Gitlab::Utils.to_boolean(ENV.fetch('ENABLE_REDIS_CACHE_COMPRESSION', '1'))
caching_config_hash[:namespace] = Gitlab::Redis::Cache::CACHE_NAMESPACE
caching_config_hash[:expires_in] = 2.weeks # Cache should not grow forever
- if Gitlab::Runtime.multi_threaded?
- caching_config_hash[:pool_size] = Gitlab::Redis::Cache.pool_size
- caching_config_hash[:pool_timeout] = 1
- end
-
- # Overrides RedisCacheStore's default value of 0
- # This makes the default value the same with Gitlab::Redis::Cache
- caching_config_hash[:reconnect_attempts] ||= ::Redis::Client::DEFAULTS[:reconnect_attempts]
config.cache_store = :redis_cache_store, caching_config_hash