From 6377dbf7d8182ab5773641cf114b4771ad4c9d71 Mon Sep 17 00:00:00 2001 From: Aditya Date: Fri, 26 Sep 2008 00:39:53 -0400 Subject: Add info about caching an action with or without the layout --- railties/doc/guides/caching/caching_with_rails.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'railties/doc') 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 -- cgit v1.2.3