This project is archived and is in readonly mode.

#166 ✓ resolved
José Valim

caches_action with conditional

Reported by José Valim | May 11th, 2008 @ 03:30 PM

A couple of changes were made to ActionController::Caching::Actions:

  • Added conditional option (:if) to caches_action method (just like in caches_page)
  • Added :layout flag to caches_action method. If you specify :layout => false, the layout will not be cached, only the action content. This is useful since most application has user info in the layout. If the :layout is not set or set to true, we have the default behavior.
  • Changes were documented
  • Tests were added
  • Test bug fix: added sleep(0.01) to assure that Time.now will be different.

The patch is attached.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Tickets have moved to Github

The new ticket tracker is available at https://github.com/rails/rails/issues

Shared Ticket Bins

Pages