Skip to content

Commit

Permalink
Always use memory_store in development
Browse files Browse the repository at this point in the history
Not only when tmp/caching-dev.txt exists
  • Loading branch information
hennevogel committed Mar 23, 2022
1 parent af49cc4 commit 5608e6c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions config/environments/development.rb
Expand Up @@ -17,20 +17,18 @@
# Enable server timing
config.server_timing = true

config.cache_store = :memory_store
# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join("tmp/caching-dev.txt").exist?
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true

config.cache_store = :memory_store
config.public_file_server.headers = {
"Cache-Control" => "public, max-age=#{2.days.to_i}"
}
else
config.action_controller.perform_caching = false

config.cache_store = :null_store
end

# Print deprecation notices to the Rails logger.
Expand Down

0 comments on commit 5608e6c

Please sign in to comment.