The best way would be to install memcached, and use memcache_client (and
perhaps acts_as_cached) to manage your caching needs. Best, because
it''ll
scale as the application grows. Setting a class variable with the data
(@@var ||= find ...) could be a temp solution [at least until you have
multiple ruby instances of your app running].
Vish
On 12/1/06, bartocc
<julien.palmas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
>
> Is there a (simple) way to cache the result of an expensive
''find'' ?
> At the moment, I use the ''session'' hash, but I
don''t feel this is the
> right way to do it ...
>
> thx for the help.
> Bartocc
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---