Method: ActiveRecord::QueryCache.complete

Defined in:
lib/active_record/query_cache.rb

.complete(caching_pool, caching_was_enabled, connection_id) ⇒ Object



37
38
39
40
41
42
43
44
45
# File 'lib/active_record/query_cache.rb', line 37

def self.complete((caching_pool, caching_was_enabled, connection_id))
  ActiveRecord::Base.connection_id = connection_id

  caching_pool.disable_query_cache! unless caching_was_enabled

  ActiveRecord::Base.connection_handler.connection_pool_list.each do |pool|
    pool.release_connection if pool.active_connection? && !pool.connection.transaction_open?
  end
end