You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using redis-mock for our dev environments. I was a bit unfamiliar with how the options worked for the set command and I came up with this:
redis.set(key, value, 'NX', 300);
Which I thought would set the key and expiry time as long as the key didn't already exist. This seems to work with redis-mock just fine. When I moved to the staging environment which uses actual redis I was getting a syntax error from redis. As it turns out what I actually wanted was this:
redis.set(key, value, 'EX', 300, 'NX');
But the issue I see here is that the first call above works in redis-mock but causes a syntax error for real redis. I am using version 0.23.0
The text was updated successfully, but these errors were encountered:
We are using redis-mock for our dev environments. I was a bit unfamiliar with how the options worked for the set command and I came up with this:
redis.set(key, value, 'NX', 300);
Which I thought would set the key and expiry time as long as the key didn't already exist. This seems to work with redis-mock just fine. When I moved to the staging environment which uses actual redis I was getting a syntax error from redis. As it turns out what I actually wanted was this:
redis.set(key, value, 'EX', 300, 'NX');
But the issue I see here is that the first call above works in
redis-mock
but causes a syntax error for real redis. I am using version 0.23.0The text was updated successfully, but these errors were encountered: