0
0
Fork 0

Clean up redis configuration. Allow using REDIS_URL to set advanced (#2732)

connection options instead of setting REDIS_HOST etc individually

Close #1986
This commit is contained in:
Eugen Rochko 2017-05-03 23:18:13 +02:00 committed by GitHub
parent 005f1fd360
commit c997091166
8 changed files with 53 additions and 61 deletions

View file

@ -16,14 +16,6 @@ Rails.application.configure do
if Rails.root.join('tmp/caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.cache_store = :redis_store, {
host: ENV['REDIS_HOST'] || 'localhost',
port: ENV['REDIS_PORT'] || 6379,
db: 0,
namespace: 'cache',
expires_in: 1.minute,
}
config.public_file_server.headers = {
'Cache-Control' => 'public, max-age=172800',
}