From 6f8159c4217dc8433a2027ced0c61e7ce94551d3 Mon Sep 17 00:00:00 2001 From: kennyj Date: Wed, 18 Jan 2012 01:53:09 +0900 Subject: Deprecate RAILS_CACHE constant. --- actionpack/lib/action_controller/railtie.rb | 2 +- actionpack/lib/action_dispatch/http/rack_cache.rb | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/railtie.rb b/actionpack/lib/action_controller/railtie.rb index fb810c41b1..a288e69649 100644 --- a/actionpack/lib/action_controller/railtie.rb +++ b/actionpack/lib/action_controller/railtie.rb @@ -14,7 +14,7 @@ module ActionController end initializer "action_controller.initialize_framework_caches" do - ActiveSupport.on_load(:action_controller) { self.cache_store ||= RAILS_CACHE } + ActiveSupport.on_load(:action_controller) { self.cache_store ||= Rails.cache } end initializer "action_controller.assets_config", :group => :all do |app| diff --git a/actionpack/lib/action_dispatch/http/rack_cache.rb b/actionpack/lib/action_dispatch/http/rack_cache.rb index cc8edee300..003ae4029d 100644 --- a/actionpack/lib/action_dispatch/http/rack_cache.rb +++ b/actionpack/lib/action_dispatch/http/rack_cache.rb @@ -8,8 +8,7 @@ module ActionDispatch new end - # TODO: Finally deal with the RAILS_CACHE global - def initialize(store = RAILS_CACHE) + def initialize(store = Rails.cache) @store = store end @@ -33,7 +32,7 @@ module ActionDispatch new end - def initialize(store = RAILS_CACHE) + def initialize(store = Rails.cache) @store = store end -- cgit v1.2.3