it should be alright if the individual items are atomic. however, if for example you need to set 5 items and you dont want any of them accessed until they have all been set, then you would want to use locking. there are examples elsewhere on how to make your operation exclusive and atomic.
On 8/1/07, Josh McFarlane <[EMAIL PROTECTED]> wrote: > On 7/31/07, Marcus Rueckert <[EMAIL PROTECTED]> wrote: > > > Under classic memcached, no two operations are executed at the > same > > > time (it's single-threaded). I don't fully understand the new multi- > > > threaded code, but it's probably safe to assume that no two > > > operations touch the same cache element at the same time. > > > > i think the bigger issue for him are 2 different server accessing the > > same memcached element. > > It shouldn't matter if you have 2 or 200 servers accessing the same > element. Assuming your hashing is stable across all client servers, it > will end up requesting it from only one memcached instance, and that > memcached instance should ensure that each request is synchronized and > does not cause a collision. > > -- > Josh McFarlane > -- "Be excellent to each other"
