Module: Catche::Controller::Pages::ClassMethods

Defined in:
lib/catche/controller/pages.rb

Instance Method Summary collapse

Instance Method Details

#cache_page(content, path, extension = nil, gzip = Zlib::BEST_COMPRESSION) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/catche/controller/pages.rb', line 17

def cache_page(content, path, extension = nil, gzip = Zlib::BEST_COMPRESSION)
  if self.catche?
    Catche::Tag.tag_page! page_cache_path(path, extension), *catche_constructed_tags
  end

  super
end

#catches_page(model, *args) ⇒ Object

Caches an action by file See ActionController ‘caches_page` for more information

catches_page Project, :index


13
14
15
# File 'lib/catche/controller/pages.rb', line 13

def catches_page(model, *args)
  catche model, *args, :type => :page
end