Thanks for the reply! Are there any performance implication of using a
normal get v/s a get that also returns the unique cas number ?

Looking forward to CAS implementation in the client. Until then I will stick
to the current locking method for which I would love to hear if there are
any improvements that I could make.

-Rakesh

On Fri, Feb 22, 2008 at 3:31 AM, Dustin Sallings <[EMAIL PROTECTED]> wrote:

>
> 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