Skip to content

Commit 6fbf8d0

Browse files
authored
Merge pull request rails#52780 from starwels/patch-1
[ci skip] Update caching development mode default status docs
2 parents 9356db3 + bfeb578 commit 6fbf8d0

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

guides/source/caching_with_rails.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,10 @@ Caching in Development
723723

724724
By default, caching is *enabled* in development mode with
725725
[`:memory_store`](#activesupport-cache-memorystore).
726+
This doesn't apply to Action Controller caching, which is disabled
727+
by default.
726728

727-
Rails also provides the rails command `dev:cache` to
728-
easily toggle Action Controller caching on/off.
729+
To enable Action Controller caching Rails provides the `bin/rails dev:cache` command.
729730

730731
```bash
731732
$ bin/rails dev:cache

railties/lib/rails/commands/dev/dev_command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
module Rails
66
module Command
77
class DevCommand < Base # :nodoc:
8-
desc "cache", "Toggle development mode caching on/off"
8+
desc "cache", "Toggle Action Controller development mode caching on/off"
99
def cache
1010
Rails::DevCaching.enable_by_file
1111
end

railties/lib/rails/dev_caching.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ def enable_by_file
1212

1313
if File.exist?(FILE)
1414
delete_cache_file
15-
puts "Development mode is no longer being cached."
15+
puts "Action Controller caching disabled for development mode."
1616
else
1717
create_cache_file
18-
puts "Development mode is now being cached."
18+
puts "Action Controller caching enabled for development mode"
1919
end
2020

2121
FileUtils.touch "tmp/restart.txt"

0 commit comments

Comments
 (0)