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:
parent
005f1fd360
commit
c997091166
8 changed files with 53 additions and 61 deletions
|
@ -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',
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue