Skip to content

Commit b56cab2

Browse files
Update development mode default caching docs (rails#52474)
* Update development mode default caching docs * code review fix Co-authored-by: Rafael Mendonça França <[email protected]>
1 parent d948ad1 commit b56cab2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

guides/source/caching_with_rails.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fragment caching. By default Rails provides fragment caching. In order to use
3434
page and action caching you will need to add `actionpack-page_caching` and
3535
`actionpack-action_caching` to your `Gemfile`.
3636

37-
By default, caching is only enabled in your production environment. You can play
37+
By default, action controller caching is only enabled in your production environment. You can play
3838
around with caching locally by running `rails dev:cache`, or by setting
3939
[`config.action_controller.perform_caching`][] to `true` in `config/environments/development.rb`.
4040

@@ -720,10 +720,11 @@ response.strong_etag = response.body # => "618bbc92e2d35ea1945008b42799b0e7"
720720

721721
Caching in Development
722722
----------------------
723+
By default, caching is *enabled* in development mode with
724+
[`:memory_store`](#activesupport-cache-memorystore).
723725

724-
It's common to want to test the caching strategy of your application
725-
in development mode. Rails provides the rails command `dev:cache` to
726-
easily toggle caching on/off.
726+
Rails also provides the rails command `dev:cache` to
727+
easily toggle action controller caching on/off.
727728

728729
```bash
729730
$ bin/rails dev:cache
@@ -732,8 +733,7 @@ $ bin/rails dev:cache
732733
Development mode is no longer being cached.
733734
```
734735

735-
By default, when development mode caching is *off*, Rails uses
736-
[`:null_store`](#activesupport-cache-nullstore).
736+
To disable caching set `cache_store` to [`:null_store`](#activesupport-cache-nullstore)
737737

738738
References
739739
----------

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Rails.application.configure do
1717
# Enable server timing.
1818
config.server_timing = true
1919

20-
# Enable/disable caching. By default caching is disabled.
21-
# Run rails dev:cache to toggle caching.
20+
# Enable/disable action controller caching. By default action controller caching is disabled.
21+
# Run rails dev:cache to toggle action controller caching.
2222
if Rails.root.join("tmp/caching-dev.txt").exist?
2323
<%- unless options.api? -%>
2424
config.action_controller.perform_caching = true

0 commit comments

Comments
 (0)