TODO change and minor SETNX optimization

This commit is contained in:
antirez
2009-12-10 16:38:24 +01:00
parent 231d758eec
commit 333fd21615
2 changed files with 1 additions and 2 deletions

View File

@ -2979,7 +2979,7 @@ static void echoCommand(redisClient *c) {
static void setGenericCommand(redisClient *c, int nx) {
int retval;
deleteIfVolatile(c->db,c->argv[1]);
if (nx) deleteIfVolatile(c->db,c->argv[1]);
retval = dictAdd(c->db->dict,c->argv[1],c->argv[2]);
if (retval == DICT_ERR) {
if (!nx) {