module Ramaze::Helper::Cache::SingletonMethods
Public Instance Methods
cache_action(hash, &block)
click to toggle source
This method allows you to cache whole actions.
@example Basic usage
class Foo < Ramaze::Controller helper :cache cache_action :method => :bar def bar rand end end
# File lib/ramaze/helper/cache.rb, line 113 def cache_action(hash, &block) hash[:key] = block if block_given? hash[:method] = hash[:method].to_s trait[:cache_action] << hash end