module ActiveRecord::ConnectionAdapters::QueryCache

def clear_query_cache

undermining the randomness you were expecting.
the same SQL query and repeatedly return the same result each time, silently
that ask the database to randomize results. Otherwise the cache would see
One reason you may wish to call this method explicitly is between queries

Clears the query cache.
def clear_query_cache
  pool.clear_query_cache
end