Module: Mack::Controller::ClassMethods

Defined in:
lib/mack-caching/page_caching/controller_extensions.rb

Instance Method Summary collapse

Instance Method Details

#cache_pages(options = {}) ⇒ Object

Used to define which pages you would or would not like cached.

Examples:

cache_pages # => will cache all pages for a controller
cache_pages :only => [:index, :show] # => will only cache the index and show pages for a controller
cache_pages :except => [:delete] # => will cache all pages except for the delete page for a controller


13
14
15
# File 'lib/mack-caching/page_caching/controller_extensions.rb', line 13

def cache_pages(options = {})
  before_filter :set_page_cache_header, options
end