instance method
lookup_sql_cache
Ruby on Rails 8.0.4
Since v7.0.10 PrivateSignature
lookup_sql_cache(sql, name, binds)
No documentation comment.
Parameters
-
sqlreq -
namereq -
bindsreq
Source
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 271
def lookup_sql_cache(sql, name, binds)
key = binds.empty? ? sql : [sql, binds]
result = nil
@lock.synchronize do
result = query_cache[key]
end
if result
ActiveSupport::Notifications.instrument(
"sql.active_record",
cache_notification_info_result(sql, name, binds, result)
)
end
result
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb line 271
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::QueryCache