ejfinneran/ratelimit — pull request #11 by lautis (2014-04-07 20:44:49+00:00)
Title: Optimize Redis commands

Use `HMGET` to fetch multiple keys from same hash. With `HMGET`, only one command needs to be sent to Redis.

Replaces MULTI/EXEC with PIPELINE. Pipeline is [slightly faster](http://www.terminalstate.net/2011/05/redis-pipelines-and-transactions.html) but does not guarantee atomicity of operations. This shouldn't cause any additional concurrency issues as the commands emitted in add do not have any dependency of each other and all clients should emit the same commands.