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, SqlCache, Sweeping Classes: Sweeper
Class Method Summary collapse
-
.included(base) ⇒ Object
:nodoc:.
Class Method Details
.included(base) ⇒ Object
:nodoc:
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/action_controller/caching.rb', line 13 def self.included(base) #:nodoc: base.class_eval do include Pages, Actions, Fragments if defined? ActiveRecord include Sweeping, SqlCache end @@perform_caching = true cattr_accessor :perform_caching end end |