Alain Ravet
2007-Mar-22 17:54 UTC
doable ? action caching if anonymous, fragment caching if logged in ?
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Alain Ravet
2007-Mar-23 21:13 UTC
Re: doable ? action caching if anonymous, fragment caching if logged in ?
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
On 3/22/07, Alain Ravet
<alain.ravet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I''d like to use different caching strategies based on the visitor
status
> - anonymous => action caching
> - logged in => fragment caching
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---