Forum: Ruby on Rails Active Records Tree Cache

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bob (Guest)
on 2006-05-02 11:04
Hi,

I have a model that uses acts_as_tree option to manage a tree structure
in the database.  Is it possible to fetch the entire tree with constant
number of database calls and cache the tree in memory?

Thanks!

Bob
Alex Y. (Guest)
on 2006-05-03 20:59
(Received via mailing list)
Bob wrote:
> Hi,
>
> I have a model that uses acts_as_tree option to manage a tree structure
> in the database.  Is it possible to fetch the entire tree with constant
> number of database calls and cache the tree in memory?
I *think* you're going to need acts_as_nested_set rather than
acts_as_tree if you want a constant number of database calls.
This topic is locked and can not be replied to.