Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Add info about caching an action with or without the layout

  • Loading branch information...
commit 6377dbf7d8182ab5773641cf114b4771ad4c9d71 1 parent 3766f56
@aditya aditya authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 railties/doc/guides/caching/caching_with_rails.txt
7 railties/doc/guides/caching/caching_with_rails.txt
@@ -113,6 +113,13 @@ class ProductController < ActionController
+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

0 comments on commit 6377dbf

Please sign in to comment.
Something went wrong with that request. Please try again.