cache()
public
Enable the query cache
within the block.
# File activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb, line 24
def cache
old, @query_cache_enabled = @query_cache_enabled, true
yield
ensure
clear_query_cache
@query_cache_enabled = old
end