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.
D8c4c145e3d00b1b85337cb2effb3694?d=identicon&s=25 Bob (Guest)
on 2006-05-02 09: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
Ad7805c9fcc1f13efc6ed11251a6c4d2?d=identicon&s=25 Alex Young (Guest)
on 2006-05-03 18: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.