mranney/node_redis — pull request #253 by holic (2012-08-15 03:56:57+00:00)
Title: eval tries evalsha first, then falls back on original eval

Lately, I've been taking advantage of scripting instead of multi/exec and have found myself sending a few hundred bytes per eval. This pull request optimizes eval by first trying evalsha, then eval if the script is not cached. On an empty cache, eval's call to evalsha will fail and the original eval will be called to prime the cache. Further calls to eval will use the lighter evalsha.

I was unable to successfully run tests against these changes as certain, unrelated tests were failing on my end (unsorted responses from `keys` and `smembers` calls). I am working on some improvements to get these tests to pass and will submit a pull request for those shortly.