instance method
cache
Ruby on Rails 8.1.2
Since v2.2.3Signature
cache(&block)
Enable the query cache within the block.
Parameters
-
blockblock
Source
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 233
def cache(&block)
pool.enable_query_cache(&block)
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb line 233
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::QueryCache