Is there a was to specify to Rails that it should hold the contents of
a table in memory?
For instances, I have a lookup table that is a two column table (id and
description) and then lots of things that belong_to those its.
class A < ActiveRecord::Base
I'd love to able to say a.lookup.description without needing another
SQL call. I know you can avoid the call using the :include feature, but
that means joins in the SQL backend, and I'm doing LOTS of these
Something like this would be great:
class Lookup < ActiveRecord::Base
Then all operations on the Lookup class would be done in memory. It
would also add a refresh method that you could manually call on the
infrequent event where the lookup table changes.
If something like this exists, can someone point me in the right
direction? If not, consider it a feature suggestion.