Pre Loading a Lua Script into Redis With Lettuce
The source code for what follows can be found on Github.
In my last article on running a lua script against redis with lettuce, we just sent the entire script [that redis will execute atomically] along with the arguments every time. For very small scripts this is unlikely to be a problem, but there is definitely a more efficient way to do this, using EVALSHA.