module ActiveRecord::ConnectionAdapters::QueryCache
def cache_sql(sql, name, binds)
def cache_sql(sql, name, binds) @lock.synchronize do result = if @query_cache[sql].key?(binds) ActiveSupport::Notifications.instrument( "sql.active_record", cache_notification_info(sql, name, binds) ) @query_cache[sql][binds] else @query_cache[sql][binds] = yield end result.dup end end