Module Merb::Cache::ControllerClassMethods
In: lib/merb-cache/cache-action.rb
lib/merb-cache/cache-page.rb

Methods

Public Instance methods

Register the action for action caching

Parameters

action<Symbol>:The name of the action to register
from_now<~minutes>:The number of minutes (from now) the cache should persist

Examples

  cache_action :mostly_static
  cache_action :barely_dynamic, 10

Register actions for action caching (before and after filters)

Parameter

actions<Symbol,Array[Symbol,~minutes]>:See cache_action

Example

  cache_actions :mostly_static, [:barely_dynamic, 10]

Register the action for page caching

Parameters

action<Symbol>:The name of the action to register
from_now<~minutes>:The number of minutes (from now) the cache should persist

Examples

  cache_page :mostly_static
  cache_page :barely_dynamic, 10

Register actions for page caching (before and after filters)

Parameter

pages<Symbol,Array[Symbol,~minutes]>:See cache_page

Example

  cache_pages :mostly_static, [:barely_dynamic, 10]

[Validate]