diff options
author | Aditya <aditya@sublucid.com> | 2008-09-26 00:39:53 -0400 |
---|---|---|
committer | Aditya <aditya@sublucid.com> | 2008-09-26 00:39:53 -0400 |
commit | 6377dbf7d8182ab5773641cf114b4771ad4c9d71 (patch) | |
tree | 418731cad31aafd4539ae3dd879b8dd9ea62c132 /railties/doc/guides/caching | |
parent | 3766f56a8ecff8803334c2d8f976372da3adfc6b (diff) | |
download | rails-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/guides/caching')
-rw-r--r-- | railties/doc/guides/caching/caching_with_rails.txt | 7 |
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 |