module ActiveRecord::ConnectionAdapters::QueryCache::ConnectionPoolConfiguration

def clear_query_cache

def clear_query_cache
  if @pinned_connection
    # With transactional fixtures, and especially systems test
    # another thread may use the same connection, but with a different
    # query cache. So we must clear them all.
    @query_cache_version.increment
  end
  query_cache.clear
end