This project is archived and is in readonly mode.
Add ability to get multiple memcached keys at the same time.
Reported by Joe Van Dyk | February 3rd, 2009 @ 12:47 AM | in 2.x
Memcached supports the ability to get multiple keys at the same time. The memcached-client library included in rails has that functionality, but MemCacheStore doesn't expose it.
The attached patch adds MemCacheStore#read_multi.
Comments and changes to this ticket
-
Eric February 3rd, 2009 @ 01:12 AM
- Tag changed from 2.3, patch to 2.3, cache, memcache, mem_cache_store, patch
+1 Looks good.
What happens if you request a key that doesn't exist as part of the list?
@cache.read_multi('foo', 'bar', 'baz')
-
Joe Van Dyk February 3rd, 2009 @ 01:23 AM
CACHE.write 'foo', '1' Cache write: foo => true
CACHE.write 'goo', '2' Cache write: goo => true
CACHE.read_multi 'foo', 'eric' => {"foo"=>"1"}
CACHE.read_multi 'dontexist' => {}
Doesn't return a result for it.
-
Joe Van Dyk February 3rd, 2009 @ 01:25 AM
Doh, better formatting:
>> CACHE.write 'foo', '1' Cache write: foo => true >> CACHE.read_multi 'foo', 'eric' => {"foo"=>"1"} >> CACHE.read_multi 'dontexist' => {}
-
Pratik May 18th, 2009 @ 07:59 PM
- Assigned user set to Jeremy Kemper
-
Joe Van Dyk December 28th, 2009 @ 07:11 PM
It looks like this was merged in Feb 2009 in commit ad857712. Mark as resolved?
-
Jeremy Kemper December 28th, 2009 @ 07:20 PM
- State changed from new to resolved
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>