aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2010-04-18 23:01:44 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2010-04-19 00:19:10 -0700
commit03aa7877f7b3a0eb5ed1bb48a30be74194c4177a (patch)
treec6dd0f37cdcbe9c43b199b492af7b902d4d98072 /activesupport/lib/active_support/cache
parent64373937a393518a6e6a63255176ca297d3c009e (diff)
downloadrails-03aa7877f7b3a0eb5ed1bb48a30be74194c4177a.tar.gz
rails-03aa7877f7b3a0eb5ed1bb48a30be74194c4177a.tar.bz2
rails-03aa7877f7b3a0eb5ed1bb48a30be74194c4177a.zip
MemoryStore#read_multi(*keys) for dev-mode compatibility with memcache store
Diffstat (limited to 'activesupport/lib/active_support/cache')
-rw-r--r--activesupport/lib/active_support/cache/memory_store.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/cache/memory_store.rb b/activesupport/lib/active_support/cache/memory_store.rb
index e6085d97ec..379922f986 100644
--- a/activesupport/lib/active_support/cache/memory_store.rb
+++ b/activesupport/lib/active_support/cache/memory_store.rb
@@ -21,6 +21,12 @@ module ActiveSupport
@data = {}
end
+ def read_multi(*names)
+ results = {}
+ names.each { |n| results[n] = read(n) }
+ results
+ end
+
def read(name, options = nil)
super do
@data[name]
@@ -45,7 +51,7 @@ module ActiveSupport
end
end
- def exist?(name,options = nil)
+ def exist?(name, options = nil)
super do
@data.has_key?(name)
end