Take a look at the documentation for fragment caching here:
Peak Obsession.
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:[email protected]]
Sent: Monday, December 05, 2005 9:41 AM
To: [email protected]
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