Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support namespaces on CAS operations #309

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fangel
Copy link

@fangel fangel commented May 24, 2017

I was doing some work on atomic updates to Memcache using CAS, and ran it an issue when you have namespaces enabled in your Memcached-client: The namespace would still be present in the object that is returned.

So when you have a namespace foo: and do a client.gets('bar', function(err, res) { ... }) then the response-object contains {cas: ?, 'foo:bar': ?} instead of the expected {cas: ?, bar: ?}.

I've updated the namespace tests to also included a successful CAS-write with a namespace and added a handle-function to the gets-function that strips the namespace off of the full key.

Kind regards
Morten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant