'Compare-And-Set update.
This requires that the key has previously been successfully
fetched with gets() or get(..., for_cas=True), and that no changes
have been made to the key since that fetch.  Typical usage is:
key = ...
client = memcache.Client()
value = client.gets(key)  # OR client.get(key, for_cas=True)
<updated value>
ok = client.cas(key, value)
If two processes run similar code, the first one calling cas()
will succeed (ok == True), while the second one will fail (ok ==
False).  This can be used to detect race conditions.
NOTE: some state (the CAS id) is stored on the Client object for
each key ever used with gets().  To prevent ever-increasing memory
usage, you must use a Client object when using cas(), and the
lifetime of your Client object should be limited to that of one
incoming HTTP request.  You cannot use the global-function-based
API.
Args:
key: Key to set.  See docs on Client for details.
value: The new value.
time: Optional expiration time, either relative number of seconds
from current time (up to 1 month), or an absolute Unix epoch time.
By default, items never expire, though items may be evicted due to
memory pressure.  Float values will be rounded up to the nearest
whole second.
min_compress_len: Ignored option for compatibility.
namespace: a string specifying an optional namespace to use in
the request.
Returns:
True if updated.  False on RPC error or if the CAS id didn\'t match.'

def cas(self, key, value, time=0, min_compress_len=0, namespace=None):

    return self._set_with_policy(MemcacheSetRequest.CAS, key, value, time, namespace)
