Skip to content

fakeredis does not support the extended set command #79

Closed
ebenoist opened this Issue Dec 4, 2013 · 1 comment

2 participants

@ebenoist
ebenoist commented Dec 4, 2013

Redis.set("foo", "bar", { nx: true, ex: 100}) when using fakeredis 0.4.3 results in:

     ArgumentError:
       wrong number of arguments (5 for 2)

Looks like fakeredis does not support the arguments hash in Redis.set

(String, Boolean) set(key, value, options = {})
Also known as: []=
Set the string value of a key.

Parameters:
key (String)
value (String)
options (Hash) (defaults to: {}) —
:ex => Fixnum: Set the specified expire time, in seconds.
:px => Fixnum: Set the specified expire time, in milliseconds.
:nx => true: Only set the key if it does not already exist.
:xx => true: Only set the key if it already exist.
Returns:
(String, Boolean) — "OK" or true, false if :nx => true or :xx => true
@caius
Collaborator
caius commented May 20, 2014

I believe merging in #106 fixes this now, so I'm going to close this issue. Thanks again for your pull request(s), and feel free to reopen this issue if it isn't entirely fixed in master.

@caius caius closed this May 20, 2014
@ebenoist ebenoist referenced this issue in reverbdotcom/once Mar 31, 2016
Merged

Change to atomic setnx call #3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.