comparison config/environments/development.rb @ 225:782fece93768

Fix redis cache for dev
author nanaya <me@nanaya.pro>
date Tue, 25 Jan 2022 02:38:40 +0900
parents ad6264cca788
children
comparison
equal deleted inserted replaced
224:657d99f51749 225:782fece93768
17 # Enable server timing 17 # Enable server timing
18 config.server_timing = true 18 config.server_timing = true
19 19
20 # Enable/disable caching. By default caching is disabled. 20 # Enable/disable caching. By default caching is disabled.
21 # Run rails dev:cache to toggle caching. 21 # Run rails dev:cache to toggle caching.
22 if Rails.root.join("tmp/caching-dev.txt").exist? 22 #if Rails.root.join("tmp/caching-dev.txt").exist?
23 config.action_controller.perform_caching = true 23 # config.action_controller.perform_caching = true
24 config.action_controller.enable_fragment_cache_logging = true 24 # config.action_controller.enable_fragment_cache_logging = true
25 25
26 config.cache_store = :memory_store 26 # config.cache_store = :memory_store
27 config.public_file_server.headers = { 27 # config.public_file_server.headers = {
28 "Cache-Control" => "public, max-age=#{2.days.to_i}" 28 # "Cache-Control" => "public, max-age=#{2.days.to_i}"
29 } 29 # }
30 else 30 #else
31 config.action_controller.perform_caching = false 31 # config.action_controller.perform_caching = false
32 32
33 config.cache_store = :null_store 33 # config.cache_store = :null_store
34 end 34 #end
35 35
36 # Print deprecation notices to the Rails logger. 36 # Print deprecation notices to the Rails logger.
37 config.active_support.deprecation = :log 37 config.active_support.deprecation = :log
38 38
39 # Raise exceptions for disallowed deprecations. 39 # Raise exceptions for disallowed deprecations.