diff options
author | Eileen Uchitelle <eileencodes@gmail.com> | 2018-09-12 10:09:59 -0400 |
---|---|---|
committer | Eileen Uchitelle <eileencodes@gmail.com> | 2018-09-12 10:09:59 -0400 |
commit | 349db176d8283a5c16816b50a92b0b319b1b8b74 (patch) | |
tree | f80a85ef9868212d9ad3b243f9233a7ebecb9e9d /activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | |
parent | 3eb0406ef56dab8c8cd60378600a53e351de0053 (diff) | |
download | rails-349db176d8283a5c16816b50a92b0b319b1b8b74.tar.gz rails-349db176d8283a5c16816b50a92b0b319b1b8b74.tar.bz2 rails-349db176d8283a5c16816b50a92b0b319b1b8b74.zip |
Fix query cache to load before first request
In a test app we observed that the query cache was not enabled on the
first request. This was because the query cache hooks are installed on
load and active record is loaded in the middle of the first request.
If we remove the `on_load` from the railtie the query cache hooks will
be installed before the first request, allowing the cache to be enabled
on that first request.
This is ok because query cache doesn't load anything else, only itself
so we're not eager loading all of active record before the first
request, just the query cache hooks.
[Eileen M. Uchitelle & Matthew Draper]
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb')
0 files changed, 0 insertions, 0 deletions