instance method cached_find_by_statement

Ruby on Rails 5.1.7

Since v5.1.7 Last seen in v5.1.7 Private — implementation detail, not part of the public API

Signature

cached_find_by_statement(key, &block)

No documentation comment.

Parameters

key req
block block
Source
# File activerecord/lib/active_record/core.rb, line 300
        def cached_find_by_statement(key, &block)
          cache = @find_by_statement_cache[connection.prepared_statements]
          cache[key] || cache.synchronize {
            cache[key] ||= StatementCache.create(connection, &block)
          }
        end

Defined in activerecord/lib/active_record/core.rb line 300 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Core::ClassMethods

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close