instance method
cache
Ruby on Rails 7.2.3
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 217
def cache(&block)
pool.enable_query_cache(&block)
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb line 217
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::QueryCache