From bfb906a905a1e8774e438b10e8cf703a829b55dc Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 17 Sep 2007 06:15:58 +0000 Subject: Speed up and simplify query caching. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7498 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/caching.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'actionpack') 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 -- cgit v1.2.3