On Feb 21, 2008, at 12:51, Rakesh Rajan wrote:

I am currently using Dustin's Java library (memcached-2.0-pre7). I havn't seen any CAS function in that. So safely assuming that I need to continue to use java for my project ( :) ) , what are the alternatives that I have ?

So from my understanding of CAS, I can pass a unique code, that I get from "get" operation, to the "set" operation. And in case it fails, I would need to fetch the latest value and update the cache entry again ( this would need to some kind of loop to make sure that I don't miss pushing any updates to cache).


        Sorry, I've been a bit behind in my emails.

No, I never quite worked CAS support into my java client. I've got a long plane ride ahead of me tomorrow, so maybe that'll give me something to do. :)

Basically, you do the get+set in a loop where the set fails if something else mutated the value between the get and set.

--
Dustin Sallings

Reply via email to