diff options
author | Stan Hu <stanhu@gmail.com> | 2019-07-19 13:58:44 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-05 15:52:52 -0700 |
commit | b5771bccc6031c3adbdee31064f1c0c981ab73d4 (patch) | |
tree | d77c04677d8ed026ba2d00f5f68caac8e2355296 /config/application.rb | |
parent | 029381b1d9219ad6fd5ed68f2f93e418f1dd55ca (diff) | |
download | gitlab-ce-b5771bccc6031c3adbdee31064f1c0c981ab73d4.tar.gz |
Use Rails 5.2 Redis caching storesh-use-redis-caching-store
This is the first step in providing a fault-tolerant and distributed
Redis caching store. We disable compression to avoid introducing a
change that could have an adverse effect in production.
Note that we won't be able to take advantage of the fault-tolerance and
distributed features yet until we solve
https://gitlab.com/gitlab-org/gitlab-ce/issues/64829.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64794
Diffstat (limited to 'config/application.rb')
-rw-r--r-- | config/application.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/application.rb b/config/application.rb index 92240426b5a..21cb79f7851 100644 --- a/config/application.rb +++ b/config/application.rb @@ -233,7 +233,10 @@ module Gitlab end # 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[:compress] = false caching_config_hash[:namespace] = Gitlab::Redis::Cache::CACHE_NAMESPACE caching_config_hash[:expires_in] = 2.weeks # Cache should not grow forever if Sidekiq.server? # threaded context @@ -241,7 +244,7 @@ module Gitlab caching_config_hash[:pool_timeout] = 1 end - config.cache_store = :redis_store, caching_config_hash + config.cache_store = :redis_cache_store, caching_config_hash config.active_job.queue_adapter = :sidekiq |