Forum: Ruby on Rails doable ? action caching if anonymous, fragment caching if lo

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Alain R. (Guest)
on 2007-03-22 20:03
(Received via mailing list)
Hi All,

I'd like to use different caching strategies based on the visitor status
 - anonymous => action caching
 - logged in => fragment caching


Is that doable? Where should I start?


TIA

Alain
Alain R. (Guest)
on 2007-03-23 23:21
(Received via mailing list)
SOLVED

The action_cache plugin
    http://agilewebdevelopment.com/plugins/action_cache

adds a methods that enables conditional action caching :

   class ApplicationController < ActionController::Base
       ...

       def cache_action?(action_name)
         !admin?
       end
     ...
    end
This topic is locked and can not be replied to.