You can achieve this by using the command multifor the hash command queue:
var redis = require("redis"),
client = redis.createClient(),
multi_queue;
multi_queue = client.multi();
...
for (key in keys) {
multi_queue.hgetall(key);
}
multi_queue.exec(function (err, replies) {
console.log("MULTI got " + replies.length + " replies");
replies.forEach(function (reply, index) {
console.log("Reply " + index + ": " + reply.toString());
});
});
source
share