diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-09-17 06:15:58 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-09-17 06:15:58 +0000 |
commit | bfb906a905a1e8774e438b10e8cf703a829b55dc (patch) | |
tree | a24612f8ed74de3dec4519649488b817839f7dd5 /actionpack/lib/action_controller | |
parent | 30fb7b8c8bfc72ed3097352539544c07cbb38d0d (diff) | |
download | rails-bfb906a905a1e8774e438b10e8cf703a829b55dc.tar.gz rails-bfb906a905a1e8774e438b10e8cf703a829b55dc.tar.bz2 rails-bfb906a905a1e8774e438b10e8cf703a829b55dc.zip |
Speed up and simplify query caching.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7498 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index 7d372cf250..3e01ee12b2 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -11,13 +11,13 @@ module ActionController #:nodoc: # Note: To turn off all caching and sweeping, set Base.perform_caching = false. module Caching def self.included(base) #:nodoc: - base.send(:include, Pages, Actions, Fragments) - if defined?(ActiveRecord) - require 'active_record/query_cache' - base.send(:include, Sweeping, SqlCache) - end - base.class_eval do + include Pages, Actions, Fragments + + if defined? ActiveRecord + include Sweeping, SqlCache + end + @@perform_caching = true cattr_accessor :perform_caching end |