Module: Padrino::Cache::Helpers::Page::ClassMethods

Defined in:
padrino-cache/lib/padrino-cache/helpers/page.rb

Instance Method Summary collapse

Instance Method Details

#expires(time) ⇒ Object

A method to set `expires` time inside `controller` blocks.

Examples:

controller :users do
  expires 15

  get :show do
    'shown'
  end
end


162
163
164
# File 'padrino-cache/lib/padrino-cache/helpers/page.rb', line 162

def expires(time)
  @_expires = time
end