This project is archived and is in readonly mode.

#2077 ✓resolved
Andrew Selder

Query Cache not enabled for subsequent connections

Reported by Andrew Selder | February 25th, 2009 @ 11:47 PM | in 3.x

If I do the following

class Foo < ActiveRecord::Base establish_connection(:some_other_db) end

and set a breakpoint in one of my actions, here's what I get:

ActiveRecord::Base.connection.query_cache_enabled => true Foo.connection.query_cache_enabled => false.

Granted, I could do something like put an around filter in application_controller to activate caching on Foo, but it seems like the principle of least surprise would indicate that query cached be enabled for all models regardless of connection

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>