public
Description: All the extra stuff you could want for the Mack Framework.
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/mack-more.git
mack-more / mack-caching / lib / page_caching / controller_extensions.rb
100644 18 lines (13 sloc) 0.293 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module Mack
  
  module Controller
 
    module ClassMethods
      def cache_pages(options = {})
        before_filter :set_page_cache_header, options
      end
    end
 
    private
    def set_page_cache_header
      response["cache_this_page"] = "true"
    end
 
  end # Controller
 
end # Mack