Re: get value, but only if cas token is not the provided one

2019-09-24 Thread dormando
> > > That is a really nice idea - I'll definitely have to explore it.  An > effective hot cache like this may reduce or eliminate the need for mitigating > specific keys.  We could > incorporate size into it so that larger values get a higher weighting. > First one's free :) I found some other

Re: get value, but only if cas token is not the provided one

2019-09-23 Thread John Reilly
On Mon, Sep 23, 2019 at 1:48 PM dormando wrote: > Gotcha. Thanks a ton for reaching out and putting up with my questions :) > Not at all :) - thank you for all your work on memcached. mget/mset/mdelete will certainly be a great addition. > One other thing mget might get you here is an easy

Re: get value, but only if cas token is not the provided one

2019-09-23 Thread dormando
Gotcha. Thanks a ton for reaching out and putting up with my questions :) I'm still a little concerned that this setup would be slower since you're blocking on the check to mc before using the local cache, but you know your workload best :) This would still be a win if the cache objects are very

Re: get value, but only if cas token is not the provided one

2019-09-23 Thread John Reilly
I am on the caching team in Box and I'm thinking about this potentially as part of a mechanism for hot key mitigation rather than for general use for all gets. Assuming I have a mechanism for detecting hot keys and notifying clients about them, I believe the clients could mitigate the impact of

Re: get value, but only if cas token is not the provided one

2019-09-22 Thread dormando
Can you give me more background on your workload? Correct me if I'm wrong but your aim was to use a local cache but check the memcached server on every fetch to find out if it's valid? If your objects are less than... like a kilobyte that's actually slower than not having the local cache at all.

Re: get value, but only if cas token is not the provided one

2019-09-22 Thread John Reilly
Hi dormando, Sorry for the delayed response. I finally got a chance to read through https://github.com/memcached/memcached/pull/484 . It sounds great. In my case, I was thinking about using a local cache to mitigate the network impact of hot keys rather than per-request performance reasons, but

Re: get value, but only if cas token is not the provided one

2019-09-17 Thread dormando
Hey, Check this out: https://github.com/memcached/memcached/pull/484 You can't quite do this with the way metaget is now, though it's feasible to add some "value if cas match on mget" flag. I'd have to think it through first. For local caches though, unless your object is huge, simply waiting

get value, but only if cas token is not the provided one

2019-09-17 Thread John Reilly
Hi all, I was just thinking it would be great to be able to cache the most used items in a local cache on the client side and I think this would be possible if there was a way for the client to send a request to get a key, but only if the cas value is not the same as the cas token of the value I