Update the server-side scripting example to use the current Redis unstable.

This commit is contained in:
Daniele Alessandri
2011-10-22 10:55:58 +02:00
parent ce75acf81f
commit d160cd9175
+3 -2
View File
@@ -29,8 +29,9 @@ class IncrementExistingKey extends ScriptedCommand
{
return
<<<LUA
if redis('exists', KEYS[1]) == 1 then
return redis('incr', KEYS[1])
local cmd = redis.call
if cmd('exists', KEYS[1]) == 1 then
return cmd('incr', KEYS[1])
end
LUA;
}