combine concurrent gets for the same keys into one get/multiget to the server
// first you need memcached. (or something that implements the methods get and getMulti)var Memcached = ;var multi = ;var getter = ;// all of these callsgettergettergetter// make only one call to the memcache server// get a,bgetter;// get c but not b because im alredy fetching bgetter;// no call is made im already requesting the keys im searching for.getter;// triggers 2 "getMulti" on the client driver.// one for keys ['a','b'] and one for just key ['c']
gets the key
get multiple keys
stats is an object
it has stats that help you determine how well you are multiplexing
rant! if you use node you should not make multiple concurrent gets for the same external resources. this applies to databases web services whatever.