Skip to content
This repository
Browse code

Remove rarely-used DRb cache store

  • Loading branch information...
commit 595e03336f7366b5143a8af295b4e0fefbb8f294 1 parent bd84b82
Jeremy Kemper authored April 17, 2009
5  activesupport/CHANGELOG
... ...
@@ -1,3 +1,8 @@
  1
+*Edge*
  2
+
  3
+* Removed rarely-used DRb cache store.  [Jeremy Kemper]
  4
+
  5
+
1 6
 *2.3.2 [Final] (March 15, 2009)*
2 7
 
3 8
 * XmlMini supports LibXML and Nokogiri backends.  #2084, #2190 [Bart ten Brinke, Aaron Patterson]
7  activesupport/lib/active_support/cache.rb
@@ -9,7 +9,6 @@ module Cache
9 9
     autoload :FileStore, 'active_support/cache/file_store'
10 10
     autoload :MemoryStore, 'active_support/cache/memory_store'
11 11
     autoload :SynchronizedMemoryStore, 'active_support/cache/synchronized_memory_store'
12  
-    autoload :DRbStore, 'active_support/cache/drb_store'
13 12
     autoload :MemCacheStore, 'active_support/cache/mem_cache_store'
14 13
     autoload :CompressedMemCacheStore, 'active_support/cache/compressed_mem_cache_store'
15 14
 
@@ -29,8 +28,8 @@ module Strategy
29 28
     #   ActiveSupport::Cache.lookup_store(:memory_store)
30 29
     #   # => returns a new ActiveSupport::Cache::MemoryStore object
31 30
     #   
32  
-    #   ActiveSupport::Cache.lookup_store(:drb_store)
33  
-    #   # => returns a new ActiveSupport::Cache::DRbStore object
  31
+    #   ActiveSupport::Cache.lookup_store(:mem_cache_store)
  32
+    #   # => returns a new ActiveSupport::Cache::MemCacheStore object
34 33
     #
35 34
     # Any additional arguments will be passed to the corresponding cache store
36 35
     # class's constructor:
@@ -47,7 +46,7 @@ def self.lookup_store(*store_option)
47 46
 
48 47
       case store
49 48
       when Symbol
50  
-        store_class_name = (store == :drb_store ? "DRbStore" : store.to_s.camelize)
  49
+        store_class_name = store.to_s.camelize
51 50
         store_class = ActiveSupport::Cache.const_get(store_class_name)
52 51
         store_class.new(*parameters)
53 52
       when nil
14  activesupport/lib/active_support/cache/drb_store.rb
... ...
@@ -1,14 +0,0 @@
1  
-module ActiveSupport
2  
-  module Cache
3  
-    class DRbStore < MemoryStore #:nodoc:
4  
-      attr_reader :address
5  
-
6  
-      def initialize(address = 'druby://localhost:9192')
7  
-        require 'drb' unless defined?(DRbObject)
8  
-        super()
9  
-        @address = address
10  
-        @data = DRbObject.new(nil, address)
11  
-      end
12  
-    end
13  
-  end
14  
-end
6  activesupport/test/caching_test.rb
@@ -14,12 +14,6 @@ def test_file_fragment_cache_store
14 14
     assert_equal "/path/to/cache/directory", store.cache_path
15 15
   end
16 16
 
17  
-  def test_drb_fragment_cache_store
18  
-    store = ActiveSupport::Cache.lookup_store :drb_store, "druby://localhost:9192"
19  
-    assert_kind_of(ActiveSupport::Cache::DRbStore, store)
20  
-    assert_equal "druby://localhost:9192", store.address
21  
-  end
22  
-
23 17
   def test_mem_cache_fragment_cache_store
24 18
     store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost"
25 19
     assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)

0 notes on commit 595e033

Please sign in to comment.
Something went wrong with that request. Please try again.