From a0c696e9c4b1897ab86ed9dd0c8495e5b037675c Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 4 May 2012 17:14:36 +0000 Subject: [PATCH] DEL multiple redis keys with one statement when possible --- daemon/redis.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/daemon/redis.c b/daemon/redis.c index eadff8185..7d997787e 100644 --- a/daemon/redis.c +++ b/daemon/redis.c @@ -331,9 +331,8 @@ void redis_update(struct call *c) { oldstreams = redisCommand(r->ctx, "LRANGE %s-streams 0 -1", c->redis_uuid); redisAppendCommand(r->ctx, "HMSET %s callid %s created %i", c->redis_uuid, c->callid, c->created); - redisAppendCommand(r->ctx, "DEL %s-streams-temp", c->redis_uuid); - redisAppendCommand(r->ctx, "DEL %s-viabranches-temp", c->redis_uuid); - count += 3; + redisAppendCommand(r->ctx, "DEL %s-streams-temp %s-viabranches-temp", c->redis_uuid, c->redis_uuid); + count += 2; for (l = c->callstreams->head; l; l = l->next) { cs = l->data;