Re: Why memcached doesn't give an option or have the capability to ignore older values with same key based on some version.

2018-04-26 Thread sachin shetty
c* for key manipulations. the server > works exactly as I described, no matter what you do or how you access it. > > On Wed, 25 Apr 2018, sachin shetty wrote: > > > Thank you. > > Does this memcached 'add' lock or 'set' lock defined in > memecached client or > &g

Re: Why memcached doesn't give an option or have the capability to ignore older values with same key based on some version.

2018-04-25 Thread sachin shetty
gt; 2) set goes first. add will fail. > > On Wed, 25 Apr 2018, sachin shetty wrote: > > > Cool. > > So let me assume the below scenario and correct me if I'm wrong here. > > > > Say thread 1 always does add and thread 2 always does set. Will there be > a

Re: Why memcached doesn't give an option or have the capability to ignore older values with same key based on some version.

2018-04-25 Thread sachin shetty
gt; 2) set goes first. add will fail. > > On Wed, 25 Apr 2018, sachin shetty wrote: > > > Cool. > > So let me assume the below scenario and correct me if I'm wrong here. > > > > Say thread 1 always does add and thread 2 always does set. Will there be > a

Re: Why memcached doesn't give an option or have the capability to ignore older values with same key based on some version.

2018-04-25 Thread sachin shetty
. > 2) set goes first. add will fail. > > On Wed, 25 Apr 2018, sachin shetty wrote: > > > Cool. > > So let me assume the below scenario and correct me if I'm wrong here. > > > > Say thread 1 always does add and thread 2 always does set. Will there be >

Re: Why memcached doesn't give an option or have the capability to ignore older values with same key based on some version.

2018-04-25 Thread sachin shetty
er updating the DB, you need > to use a SET. If you don't care and only ever want the first thread to > win, you can always use ADD. > > On Wed, 25 Apr 2018, sachin shetty wrote: > > > Thank you for the reply. > > Can this add be used always, I mean during an upd

Re: Why memcached doesn't give an option or have the capability to ignore older values with same key based on some version.

2018-04-25 Thread sachin shetty
ck, waits and retries > > etc. bit more chatter but with added benefit of reducing stampeding herd > if that's an issue. > > On Wed, 25 Apr 2018, sachin shetty wrote: > > > There is a scenario where a cache gets updated by two threads like the > instance > > m

Why memcached doesn't give an option or have the capability to ignore older values with same key based on some version.

2018-04-25 Thread sachin shetty
There is a scenario where a cache gets updated by two threads like the instance mentioned below a. thread 1 looks at the memcache key and gets a miss b. thread 1 falls back to the database c. thread 2 changes the database value d. thread 2 updates the memcache key with the new value e.