On Oct 4, 9:28 am, Marko Kevac <[EMAIL PROTECTED]> wrote: > Hello. > > Simple question, so simple answer pls. > > Are get and set commands atomic?
Depends on what you mean. get is atomic and set is atomic, but you can't do an atomic get+set (though CAS will allow you to emulate it). No two sets for the same key will ever corrupt each other (though if two happen at the "same time", you won't know for sure which one won). A get will never return anything other than exactly what was set (i.e. a set will not modify the data a get is transmitting). If memcached didn't have these properties, it wouldn't be useful in most of the applications where it's necessary. :)
