method

cache

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.