aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc
diff options
context:
space:
mode:
authorAditya <aditya@sublucid.com>2008-09-26 00:39:53 -0400
committerAditya <aditya@sublucid.com>2008-09-26 00:39:53 -0400
commit6377dbf7d8182ab5773641cf114b4771ad4c9d71 (patch)
tree418731cad31aafd4539ae3dd879b8dd9ea62c132 /railties/doc
parent3766f56a8ecff8803334c2d8f976372da3adfc6b (diff)
downloadrails-6377dbf7d8182ab5773641cf114b4771ad4c9d71.tar.gz
rails-6377dbf7d8182ab5773641cf114b4771ad4c9d71.tar.bz2
rails-6377dbf7d8182ab5773641cf114b4771ad4c9d71.zip
Add info about caching an action with or without the layout
Diffstat (limited to 'railties/doc')
-rw-r--r--railties/doc/guides/caching/caching_with_rails.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/doc/guides/caching/caching_with_rails.txt b/railties/doc/guides/caching/caching_with_rails.txt
index b49e7c95a9..d5b8b03669 100644
--- a/railties/doc/guides/caching/caching_with_rails.txt
+++ b/railties/doc/guides/caching/caching_with_rails.txt
@@ -113,6 +113,13 @@ class ProductController < ActionController
end
-----------------------------------------------------
+And you can also use :if (or :unless) to pass a Proc that specifies when the
+action should be cached. Also, you can use :layout => false to cache without
+layout so that dynamic information in the layout such as logged in user info
+or the number of items in the cart can be left uncached. This feature is
+available as of Rails 2.2.
+
+
[More: more examples? Walk-through of action caching from request to response?
Description of Rake tasks to clear cached files? Show example of
subdomain caching? Talk about :cache_path, :if and assing blocks/Procs