Module: ActiveRecordHostPool::ClearOnHandlerPatch

Defined in:
lib/active_record_host_pool/clear_query_cache_patch.rb

Overview

For Rails 6.1 & 7.0.

Instance Method Summary collapse

Instance Method Details

#clear_on_handler(handler) ⇒ Object



31
32
33
34
35
# File 'lib/active_record_host_pool/clear_query_cache_patch.rb', line 31

def clear_on_handler(handler)
  handler.all_connection_pools.each do |pool|
    pool._unproxied_connection.clear_query_cache if pool.active_connection?
  end
end