aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/cache.rb9
-rw-r--r--activesupport/lib/active_support/cache/drb_store.rb1
2 files changed, 4 insertions, 6 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb
index 2f1143e610..07c83774df 100644
--- a/activesupport/lib/active_support/cache.rb
+++ b/activesupport/lib/active_support/cache.rb
@@ -7,10 +7,13 @@ module ActiveSupport
case store
when Symbol
+ require "active_support/cache/#{store.to_s}"
+
store_class_name = (store == :drb_store ? "DRbStore" : store.to_s.camelize)
store_class = ActiveSupport::Cache.const_get(store_class_name)
store_class.new(*parameters)
when nil
+ require "active_support/cache/memory_store"
ActiveSupport::Cache::MemoryStore.new
else
store
@@ -137,9 +140,3 @@ module ActiveSupport
end
end
end
-
-require 'active_support/cache/file_store'
-require 'active_support/cache/memory_store'
-require 'active_support/cache/drb_store'
-require 'active_support/cache/mem_cache_store'
-require 'active_support/cache/compressed_mem_cache_store'
diff --git a/activesupport/lib/active_support/cache/drb_store.rb b/activesupport/lib/active_support/cache/drb_store.rb
index b80c2ee4d5..f06f08f566 100644
--- a/activesupport/lib/active_support/cache/drb_store.rb
+++ b/activesupport/lib/active_support/cache/drb_store.rb
@@ -1,4 +1,5 @@
require 'drb'
+require 'active_support/cache/memory_store'
module ActiveSupport
module Cache