Forum: Ruby on Rails Multiple DBs and Query Cache

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Andrew S. (Guest)
on 2009-02-25 22:42
(Received via mailing list)
Hi all,

I have an application where the majority of models live in one main
DB, while I have a couple model relying on data in a old DB.

So I created an abstract class for those models and called
establish_connection() to the old DB. So far so good.

I'm running some fairly repetitive queries and I noticed that some of
them were taking an excessively long time. After some digging, it
turns out that query_cache_enabled is false for all the models that
use my newly established connection. The models that use AR::Base's
connection work fine with the query cache.

Anybody know how to turn on query caching when you establish a new

Rails 2.2.2


This topic is locked and can not be replied to.