RE: per user cache


#1

Take a look at the documentation for fragment caching here:
http://rails.rubyonrails.com/classes/ActionController/Caching/Fragments.
html

I think you could do something like this in your view to cache the
weather results for each Zip code:

<% cache(:action => “list”, :action_suffix => @user.zipcode) do %>


From: Adam D. [mailto:removed_email_address@domain.invalid]
Sent: Monday, December 05, 2005 9:41 AM
To: removed_email_address@domain.invalid
Subject: [Rails] per user cache

Hello,

I have a dynamic website that i want to cache a piece of per user.
There is a part of the page that makes a call to Yahoo Weather to pull
the information down. Instead of making that call for every page load
(same idea with google maps), i would like just to cache that fragment
of the page. However each user has a different zip so i need to cache
this on a per user level.

Is this possible?

thanks
adam


#2

does this need to be explicitly turned on in development? Its not
workign so
far for me.

thanks
adam


#3

On 12/6/05, Adam D. removed_email_address@domain.invalid wrote:

does this need to be explicitly turned on in development? Its not workign so
far for me.

I believe that caching is disabled in development mode. Or do you mean
that it’s ‘not working’ in a different way?

thanks
adam

Sincerely,

Tom L.
removed_email_address@domain.invalid
http://AllTom.com/