diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index ab40e1a17a0478bd98673cb4077cd55dba4a64b8..5fc1000d252847a20bd6ed11324f57108429a34d 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,3 +1,8 @@ +*Edge* + +* Removed rarely-used DRb cache store. [Jeremy Kemper] + + *2.3.2 [Final] (March 15, 2009)* * XmlMini supports LibXML and Nokogiri backends. #2084, #2190 [Bart ten Brinke, Aaron Patterson] diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index a048427d5bf0b994756bf66b3ac5f4531766041c..4b2eebb007aac48201e592c53410b7afcdcd8529 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -9,7 +9,6 @@ module Cache autoload :FileStore, 'active_support/cache/file_store' autoload :MemoryStore, 'active_support/cache/memory_store' autoload :SynchronizedMemoryStore, 'active_support/cache/synchronized_memory_store' - autoload :DRbStore, 'active_support/cache/drb_store' autoload :MemCacheStore, 'active_support/cache/mem_cache_store' autoload :CompressedMemCacheStore, 'active_support/cache/compressed_mem_cache_store' @@ -29,8 +28,8 @@ module Strategy # ActiveSupport::Cache.lookup_store(:memory_store) # # => returns a new ActiveSupport::Cache::MemoryStore object # - # ActiveSupport::Cache.lookup_store(:drb_store) - # # => returns a new ActiveSupport::Cache::DRbStore object + # ActiveSupport::Cache.lookup_store(:mem_cache_store) + # # => returns a new ActiveSupport::Cache::MemCacheStore object # # Any additional arguments will be passed to the corresponding cache store # class's constructor: @@ -47,7 +46,7 @@ def self.lookup_store(*store_option) case store when Symbol - store_class_name = (store == :drb_store ? "DRbStore" : store.to_s.camelize) + store_class_name = store.to_s.camelize store_class = ActiveSupport::Cache.const_get(store_class_name) store_class.new(*parameters) when nil diff --git a/activesupport/lib/active_support/cache/drb_store.rb b/activesupport/lib/active_support/cache/drb_store.rb deleted file mode 100644 index b16ed25aa3b5b76f40fb076e402933b7e1de1e1a..0000000000000000000000000000000000000000 --- a/activesupport/lib/active_support/cache/drb_store.rb +++ /dev/null @@ -1,14 +0,0 @@ -module ActiveSupport - module Cache - class DRbStore < MemoryStore #:nodoc: - attr_reader :address - - def initialize(address = 'druby://localhost:9192') - require 'drb' unless defined?(DRbObject) - super() - @address = address - @data = DRbObject.new(nil, address) - end - end - end -end diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index 788326c73ea8881697d0070dc1e6d3eef07f9605..8bb0c155cf7c3a62ea3aa360a9fc1287e83730b9 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -14,12 +14,6 @@ def test_file_fragment_cache_store assert_equal "/path/to/cache/directory", store.cache_path end - def test_drb_fragment_cache_store - store = ActiveSupport::Cache.lookup_store :drb_store, "druby://localhost:9192" - assert_kind_of(ActiveSupport::Cache::DRbStore, store) - assert_equal "druby://localhost:9192", store.address - end - def test_mem_cache_fragment_cache_store store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost" assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)