Skip to content

Commit 9c8716a

Browse files
authored
Set memory store to be default in development mode (rails#52434)
Otherwise our new rate limit feature won't be testable out-of-the-box in development mode.
1 parent 1dd37e0 commit 9c8716a

File tree

1 file changed

+3
-4
lines changed
  • railties/lib/rails/generators/rails/app/templates/config/environments

1 file changed

+3
-4
lines changed

railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ Rails.application.configure do
2323
<%- unless options.api? -%>
2424
config.action_controller.perform_caching = true
2525
config.action_controller.enable_fragment_cache_logging = true
26-
2726
<%- end -%>
28-
config.cache_store = :memory_store
2927
config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
3028
else
3129
config.action_controller.perform_caching = false
32-
33-
config.cache_store = :null_store
3430
end
31+
32+
# Change this to :null_store to avoid any caching
33+
config.cache_store = :memory_store
3534
<%- unless skip_active_storage? -%>
3635

3736
# Store uploaded files on the local file system (see config/storage.yml for options).

0 commit comments

Comments
 (0)