Skip to content

Commit dbbd1cb

Browse files
author
Rui Marinho
committed
Update watch and mget to use array arguments
This is a small performance improvement since the `redis` module offers a straight passthrough mode for command callbacks, since it does not rely on parsing `arguments`.
1 parent 62794c3 commit dbbd1cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ Limiter.prototype.get = function (fn) {
112112
}
113113

114114
function mget() {
115-
db.watch(count, function (err) {
115+
db.watch([count], function (err) {
116116
if (err) return fn(err);
117-
db.mget(count, limit, reset, function (err, res) {
117+
db.mget([count, limit, reset], function (err, res) {
118118
if (err) return fn(err);
119119
if (!res[0] && res[0] !== 0) return create();
120120

0 commit comments

Comments
 (0)