> That said, :include is not a solution, cause it also unnecessarily
> makes bigger query just to fetch object which I already have in
> memory.
> Instant variable is not enough. My example was intentionally simple
> just to show what I mean.
> Imagine that I have few authors somewhere, and I collect their posts,
> and this posts list is accessed from outside.
> Also I was more hoping to see opinion about suggested extension to
> has_many.

ActiveRecord on edge rails has a cache that is active in
ActionController requests so this shouldn't be a problem.  I also have
a plugin that takes a slightly different route in caching frequently
accessed records in a single request.

http://activereload.net/2007/5/23/spend-less-time-in-the-database-and-more-time-outdoors


-- 
Rick Olson
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to