Module: Rack::PageCaching::ActionController::ClassMethods
- Defined in:
- lib/rack/page_caching/action_controller.rb
Instance Method Summary collapse
Instance Method Details
#caches_page(*actions) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/rack/page_caching/action_controller.rb', line 7 def caches_page(*actions) return unless perform_caching = actions. gzip_level = .fetch(:gzip, Zlib::BEST_COMPRESSION) gzip_level = Rack::PageCaching::Utils.gzip_level(gzip_level) after_filter({ only: actions }.merge()) do |c| c.request.env['rack.page_caching.perform_caching'] = true c.request.env['rack.page_caching.compression'] = gzip_level end end |