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 of set with options #462

Closed
michaelwittig opened this issue Jul 11, 2013 · 3 comments
Closed

Support of set with options #462

michaelwittig opened this issue Jul 11, 2013 · 3 comments
Labels

Comments

@michaelwittig
Copy link

http://redis.io/commands/set supports options like XX. Is it possible to use them? I tried

client.set(key, value, "PX expiry", function (err) {});
client.set(key, value, {PX:  expiry}, function (err) {});

which does not work.

@brycebaril
Copy link
Contributor

It does indeed work! 😸

Set "foo" to "bar" expiring in 10 seconds, but only if key "foo" already exists:

r.set("foo", "bar", "EX", 10, "XX")

@michaelwittig
Copy link
Author

That's even quiet obvious... :D thanks!

@emilhem
Copy link

emilhem commented Jul 22, 2016

Could this be clarified with regards to expiry (like http://redis.io/commands/expire) in the documentation for node_redis?

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

No branches or pull requests

4 participants