evan/memcached — pull request #152 by fbogsany (2014-04-21 15:54:52+00:00)
Title: Add support for multi-entry CAS

`Memcached.cas` only supports CAS on a single entry, requiring many roundtrips for bulk operations.

This adds support for multi-entry CAS using `memcached_mget` and `memcached_fetch_rvalue`. The API:
- raises `NotFound` if none of the keys were in memcached
- passes a hash of key,value pairs found in memcached to the block
- expects a hash of (modified) key,value pairs to be returned from the block
- raises `ConnectionDataExists` if CAS fails for any of the returned keys, after CAS has been attempted for all returned keys.

@arthurnn, @camilo review pls?