instance method lookup_sql_cache

Ruby on Rails 7.2.3

Since v7.0.10 Private

Available in: v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

lookup_sql_cache(sql, name, binds)

No documentation comment.

Parameters

sql req
name req
binds req
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(sql, name, binds)
            )
          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

Type at least 2 characters to search.

↑↓ navigate · open · esc close