method

cache

rails latest stable - Class: ActiveRecord::QueryCache::ClassMethods
cache(&block)
public

Enable the query cache within the block if Active Record is configured. If it’s not, it will execute the given block.