Looking at this code below (taken from git page )
var redis = require("redis"),
client = redis.createClient(), multi;
client.mset("incr thing", 100, "incr other thing", 1, redis.print);
multi = client.multi();
multi.exec(function (err, replies) {
console.log(replies);
client.quit();
});
I want to know if client.quit () is optional, or if multi.exec () automatically rolls for me? I am trying to debug a memory leak in my redis and I realized that I am not using .quit () anywhere. Should I be?
Sense, should my code look like this?
client = redis.createClient();
multi = clent.multi();
multi.exec( {something} );
client.quit();
Basically, where does client.quit go and what do I even need?
source
share