Skip to content

Commit 79b1de6

Browse files
committed
give this another go
1 parent 3fc3fe0 commit 79b1de6

2 files changed

Lines changed: 10 additions & 13 deletions

File tree

config/application.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ class Application < Rails::Application
2828
config.i18n.default_locale = :nl
2929
config.i18n.fallbacks = [:nl]
3030

31+
if ENV['REDIS_HOST'].present?
32+
cable_url = config_for(:cable)['url']
33+
config.cache_store :redis_cache_store, {
34+
url: cable_url,
35+
pool: { size: ENV.fetch('RAILS_MAX_THREADS', 5).to_i, timeout: 5 }
36+
}
37+
else
38+
config.cache_store :memory_store
39+
end
40+
3141
config.active_job.queue_adapter = :sidekiq
3242

3343
config.exceptions_app = routes

config/initializers/cache_store.rb

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)