diff options
author | Matthew Draper <matthew@trebex.net> | 2016-10-24 13:53:00 -0500 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2016-10-27 00:48:35 -0500 |
commit | 09b6cc28bf2bd7c37289d5e9a3e04a04a1ec0db3 (patch) | |
tree | 118ba38efb0625d756a3e6f1f3ed0ba9434f9435 /activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | |
parent | fa7efca553e325b2aabb087a4eddf4560c356094 (diff) | |
download | rails-09b6cc28bf2bd7c37289d5e9a3e04a04a1ec0db3.tar.gz rails-09b6cc28bf2bd7c37289d5e9a3e04a04a1ec0db3.tar.bz2 rails-09b6cc28bf2bd7c37289d5e9a3e04a04a1ec0db3.zip |
Clear query cache during checkin, instead of an execution callback
It doesn't make sense for the query cache to persist while a connection
moves through the pool and is assigned to a new thread.
[Samuel Cochran & Matthew Draper]
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index 0c7197a002..2296df4481 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -62,17 +62,17 @@ module ActiveRecord # notably, the instance methods provided by SchemaStatements are very useful. class AbstractAdapter ADAPTER_NAME = "Abstract".freeze + include ActiveSupport::Callbacks + define_callbacks :checkout, :checkin + include Quoting, DatabaseStatements, SchemaStatements include DatabaseLimits include QueryCache - include ActiveSupport::Callbacks include ColumnDumper include Savepoints SIMPLE_INT = /\A\d+\z/ - define_callbacks :checkout, :checkin - attr_accessor :visitor, :pool attr_reader :schema_cache, :owner, :logger alias :in_use? :owner |