diff options
author | Joe Van Dyk <joe@fixieconsulting.com> | 2009-02-02 16:43:14 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-05-18 13:43:56 -0700 |
commit | 29550cc91f8dcbfe3e4020986d719c77ddd2f14d (patch) | |
tree | 3f085b5ee16cdf55f3659bc7bc8dd71d6aaf2115 /activesupport/lib/active_support | |
parent | 3e2f0800e33cc056d344a45557815b19463ab416 (diff) | |
download | rails-29550cc91f8dcbfe3e4020986d719c77ddd2f14d.tar.gz rails-29550cc91f8dcbfe3e4020986d719c77ddd2f14d.tar.bz2 rails-29550cc91f8dcbfe3e4020986d719c77ddd2f14d.zip |
Add ability to get multiple memcached keys at the same time (via MemCacheStore#read_multi).
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/cache/mem_cache_store.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb index 4d8e1fdd67..90b7526fe1 100644 --- a/activesupport/lib/active_support/cache/mem_cache_store.rb +++ b/activesupport/lib/active_support/cache/mem_cache_store.rb @@ -43,6 +43,11 @@ module ActiveSupport extend Strategy::LocalCache end + # Reads multiple keys from the cache. + def read_multi(*keys) + @data.get_multi keys + end + def read(key, options = nil) # :nodoc: super @data.get(key, raw?(options)) |