Module: ActiveRecordHostPool::ClearQueryCachePatch

Defined in:
lib/active_record_host_pool/clear_query_cache_patch.rb

Overview

For Rails 7.1.

Instance Method Summary collapse

Instance Method Details

#clear_query_caches_for_current_threadObject



22
23
24
25
26
# File 'lib/active_record_host_pool/clear_query_cache_patch.rb', line 22

def clear_query_caches_for_current_thread
  connection_handler.each_connection_pool do |pool|
    pool._unproxied_connection.clear_query_cache if pool.active_connection?
  end
end