visionmedia/node-ratelimiter — pull request #2 by FGRibreau (2014-03-14 15:58:11+00:00)
Title: Handle concurrent calls

When multiple successive calls are made the next calls should not create again the limiter in Redis.

Since setnex does not exist in Redis, I used setnx + expire. The drawback is that if the key already exists, its ttl will still be changed however since it will still expire in the future it may not be an real issue.

A less performant option (on the network side) would be to add the expire directly inside the exec() when `res[0] === 1`.