This project is archived and is in readonly mode.

#25 ✓resolved
Paul Horsfall

Allow if option for caches_page

Reported by Paul Horsfall | April 19th, 2008 @ 07:35 PM

This is a patch to allow an if option to be passed to caches_page, much as you can for session management. e.g.

caches_page :index, :if => { |c| !c.request.format.json? }

I've included a test, and split the call to caches_page in the test controller into two, so that caches_page is called with and without an if option.

I've also moved the test for whether an action should be cached out of the block passed to after_filter, and instead pass the actions we want caching to after_filter via the only option.

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 »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket


Referenced by