aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorJames Baer <jamesfbaer@gmail.com>2017-03-17 16:02:24 -0400
committerJames Baer <jamesfbaer@gmail.com>2017-03-17 16:02:24 -0400
commitda7c4126d34c358cd83a0343af800c1c3d4ac5d8 (patch)
treeac3b2dbe22204275ff0f25ae0b5b239e8b23e0d8 /guides
parentbac40b9cc8bae5a88743dba01bdee24ef8a2d579 (diff)
downloadrails-da7c4126d34c358cd83a0343af800c1c3d4ac5d8.tar.gz
rails-da7c4126d34c358cd83a0343af800c1c3d4ac5d8.tar.bz2
rails-da7c4126d34c358cd83a0343af800c1c3d4ac5d8.zip
Improve Caching with Rails Guides [ci skip]
Adds the "Caching in Development" section to demonstrate usage of the dev:cache task in development mode. Also, makes a small grammatical correction in section 2.4.
Diffstat (limited to 'guides')
-rw-r--r--guides/source/caching_with_rails.md16
1 files changed, 15 insertions, 1 deletions
diff --git a/guides/source/caching_with_rails.md b/guides/source/caching_with_rails.md
index fd7626250c..af4ef6a58d 100644
--- a/guides/source/caching_with_rails.md
+++ b/guides/source/caching_with_rails.md
@@ -396,7 +396,7 @@ config.cache_store = :file_store, "/path/to/cache/directory"
```
With this cache store, multiple server processes on the same host can share a
-cache. The cache store is appropriate for low to medium traffic sites that are
+cache. This cache store is appropriate for low to medium traffic sites that are
served off one or two hosts. Server processes running on different hosts could
share a cache by using a shared file system, but that setup is not recommended.
@@ -570,6 +570,20 @@ You can also set the strong ETag directly on the response.
response.strong_etag = response.body # => "618bbc92e2d35ea1945008b42799b0e7"
```
+Caching in Development
+----------------------
+
+It's common to want to test the caching strategy of your application
+in developement mode. Rails provides the rake task `dev:cache` to
+easily toggle caching on/off.
+
+```bash
+$ bin/rails dev:cache
+Development mode is now being cached.
+$ bin/rails dev:cache
+Development mode is no longer being cached.
+```
+
References
----------