Created
October 29, 2015 11:48
-
-
Save antirez/85783d7ed171ec87c932 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /tmp/script.lua :luarepl*: ?? | |
redis.call('get','foo'); | |
redis.replicate_commands(); | |
redis.call('set','foo',math.random()); | |
redis.call('set','bar',math.random()); | |
return redis.call('get','foo') | |
redis-cli --slave (in a different terminal) | |
redis-cli --eval /tmp/script.lua | |
"0.1252478412935733" | |
(slave output is the following) | |
"MULTI" | |
"set","foo","0.1252478412935733" | |
"set","bar","0.41615338316939465" | |
"EXEC" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment