Module: ActionController::Caching

Defined in:
lib/action_controller/caching.rb

Overview

Caching is a cheap way of speeding up slow applications by keeping the result of calculations, renderings, and database calls around for subsequent requests. Action Controller affords you three approaches in varying levels of granularity: Page, Action, Fragment.

You can read more about each approach and the sweeping assistance by clicking the modules below.

Note: To turn off all caching and sweeping, set Base.perform_caching = false.

Defined Under Namespace

Modules: Actions, Fragments, Pages, Sweeping Classes: Sweeper

Class Method Summary collapse

Class Method Details

.append_features(base) ⇒ Object

:nodoc:



11
12
13
14
15
16
17
18
# File 'lib/action_controller/caching.rb', line 11

def self.append_features(base) #:nodoc:
  super
  base.send(:include, Pages, Actions, Fragments, Sweeping)
  base.class_eval do
    @@perform_caching = true
    cattr_accessor :perform_caching
  end
end