HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Redis Lua script interpreter to execute the script. Reids 2.6 version supported by the embedded Lua environment. Common command script forEVAL.
Eval basic syntax of the command is as follows:
redis 127.0.0.1:6379> EVAL script numkeys key [key /en.] arg [arg /en.]
The following example demonstrates redis script work process:
redis 127.0.0.1:6379> EVAL "return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}" 2 key1 key2 first second 1) "key1" 2) "key2" 3) "first" 4) "second"
The following table lists the redis script common commands:
No. | Command and description |
---|---|
1 | EVAL script numkeys key [key /en.] arg [arg /en.] Executive Lua script. |
2 | EVALSHA sha1 numkeys key [key /en.] arg [arg /en.] Executive Lua script. |
3 | SCRIPT EXISTS script [script /en.] Specifies whether the script has been saved in the cache them. |
4 | SCRIPT FLUSH Remove all scripts from the script cache. |
5 | SCRIPT KILL Kill Lua scripts that are currently running. |
6 | SCRIPT LOAD script Add the script to the script cache script, but the script does not execute immediately. |