don't load value from VM for EXISTS

This commit is contained in:
Pieter Noordhuis
2010-05-07 11:40:26 +02:00
parent a0e7e5f516
commit f4f06efccc
2 changed files with 6 additions and 2 deletions

View File

@ -4343,7 +4343,12 @@ static void delCommand(redisClient *c) {
}
static void existsCommand(redisClient *c) {
addReply(c,lookupKeyRead(c->db,c->argv[1]) ? shared.cone : shared.czero);
expireIfNeeded(c->db,c->argv[1]);
if (dictFind(c->db->dict,c->argv[1])) {
addReply(c, shared.cone);
} else {
addReply(c, shared.czero);
}
}
static void selectCommand(redisClient *c) {