diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/environments/production.rb | 3 | ||||
-rw-r--r-- | config/initializers/mini_profiler.rb | 17 |
2 files changed, 2 insertions, 18 deletions
diff --git a/config/environments/production.rb b/config/environments/production.rb index 7f13fcf6b..dcb659d6c 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -50,7 +50,8 @@ Rails.application.configure do host: ENV.fetch('REDIS_HOST') { 'localhost' }, port: ENV.fetch('REDIS_PORT') { 6379 }, db: 0, - namespace: 'cache' + namespace: 'cache', + expires_in: 20.minutes } # Enable serving of images, stylesheets, and JavaScripts from an asset server. diff --git a/config/initializers/mini_profiler.rb b/config/initializers/mini_profiler.rb deleted file mode 100644 index 265783618..000000000 --- a/config/initializers/mini_profiler.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'rack-mini-profiler' - -Rack::MiniProfilerRails.initialize!(Rails.application) - -Rails.application.middleware.swap(Rack::Deflater, Rack::MiniProfiler) -Rails.application.middleware.swap(Rack::MiniProfiler, Rack::Deflater) - -Rack::MiniProfiler.config.storage = Rack::MiniProfiler::MemoryStore - -if Rails.env.production? - Rack::MiniProfiler.config.storage_options = { - host: ENV.fetch('REDIS_HOST') { 'localhost' }, - port: ENV.fetch('REDIS_PORT') { 6379 }, - } - - Rack::MiniProfiler.config.storage = Rack::MiniProfiler::RedisStore -end |