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