diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-17 09:04:21 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-17 09:04:21 -0800 |
commit | ee190b8e6db5a11beb682ee3487b605d7608ff17 (patch) | |
tree | 2346d33a3dab765d501e357a242a6656844b113b /actionpack/lib | |
parent | 98081cbe06c389bb022d777ce03a7054061ceca5 (diff) | |
parent | 6f8159c4217dc8433a2027ced0c61e7ce94551d3 (diff) | |
download | rails-ee190b8e6db5a11beb682ee3487b605d7608ff17.tar.gz rails-ee190b8e6db5a11beb682ee3487b605d7608ff17.tar.bz2 rails-ee190b8e6db5a11beb682ee3487b605d7608ff17.zip |
Merge pull request #4500 from kennyj/should_deprecate_rails_cache
[Proposal] We should deprecate the RAILS_CACHE constant.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/railtie.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/http/rack_cache.rb | 5 |
2 files changed, 3 insertions, 4 deletions
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 |