add a new SET option KEEPTTL that doesn't remove expire time

This commit is contained in:
zhaozhao.zz
2019-12-18 14:49:38 +08:00
parent b7c78b7651
commit 24044f3356
8 changed files with 38 additions and 18 deletions

View File

@ -754,7 +754,7 @@ void bitopCommand(client *c) {
/* Store the computed value into the target key */
if (maxlen) {
o = createObject(OBJ_STRING,res);
setKey(c->db,targetkey,o);
setKey(c->db,targetkey,o,0);
notifyKeyspaceEvent(NOTIFY_STRING,"set",targetkey,c->db->id);
decrRefCount(o);
} else if (dbDelete(c->db,targetkey)) {