rust-memcache icon indicating copy to clipboard operation
rust-memcache copied to clipboard

Expose the cas_id in binary protocol.

Open letmutx opened this issue 4 years ago • 4 comments

This will be useful for letmutx/ghetto-lock-rs#10

letmutx avatar Dec 26 '19 12:12 letmutx

One thought is that we could have a BinaryClient which works only with binary protocol and have methods that would take cas_id for all operations as necessary. @aisk thoughts?

letmutx avatar Dec 29 '19 13:12 letmutx

I think it's cool to have this method, and for ASCII protocol, seems we can using the mget related API to implement it?

https://github.com/memcached/memcached/blob/master/doc/protocol.txt#L472

aisk avatar Dec 30 '19 12:12 aisk

Sorry maybe I had some misunderstanding, what you want is a single function to get a cas_id from a key without the total value body? Or something else?

aisk avatar Dec 30 '19 12:12 aisk

Yes, metaget and metaset seem to be similar to the ASCII commands to the binary commands I was talking about.

Implementing the feature I want in the binary protocol is much less work with the current code we have, though.

letmutx avatar Dec 30 '19 14:12 letmutx