EVAL、EVALSHA、SCRIPT EXISTS、SCRIPT FLUSH、SCRIPT KILL、SCRIPT LOAD 3.2.0版本后有加入了 lua 脚本的调试功能和命令SCRIPT DEBUG EVAL :执行一段lua脚本,每次都需要将完整的lua脚本传递给redis服务器。使用时要考虑每次发送脚本主体会带来资源的损耗。 SCRIPT LOAD :将一段lua脚本缓存到redis中并返回一个tag串,...
编写Lua脚本:首先,我们需要编写Lua脚本。可以使用任何文本编辑器编写Lua脚本,并将其保存为一个文件,例如script.lua。 加载Lua脚本:在redis-cli.exe中,可以使用SCRIPT LOAD命令将Lua脚本加载到Redis服务器中。这个命令将返回一个SHA1哈希值,用于标识已加载的脚本。 >SCRIPT LOAD"return 'Hello, World!'""26b1722d5a...
redis-cli --pipe 接收管道作为输入 所以下面这条命令应该没有问题: cat h:\getidthengetentity.lua | redis-cli script load --pipe 也出现了 sha, 但是郁闷的是这个 sha 和 script load --pipe 一样, 正确的命令应该是 redis-cli -x script load < h:\getidthengetetity.lua f244aa5b3450968bf43a4...
The test will run for the specified amount of seconds. --eval <file> Send an EVAL command using the Lua script at <file>. --ldb Used with --eval enable the Redis Lua debugger. --ldb-sync-mode Like --ldb but uses the synchronous Lua debugger, in this mode the server is blocked an...
下面的命令不支持: PUBLISH,SWAPDB,MOVE,FLUSHALL,FLUSHDB,MULTI,EXEC,SCRIPT FLUSH,SCRIPT LOAD,EVAL,EVALSHA. 下面的命令有限支持 RPOPLPUSH,SDIFFSTORE,SINTERSTORE,SMOVE,ZINTERSTORE,ZUNIONSTORE,DEL,UNLINK,RENAME,RENAMENX,PFMERGE,PFCOUNT,MSETNX,BRPOPLPUSH,BITOP,MSET,COPY,BLMOVE,LMOVE,ZDIFFSTORE,GEOSEARCHSTORE...
If userstmigrate data to cluster. the following commands not supportedPUBLISH,SWAPDB,MOVE,FLUSHALL,FLUSHDB,MULTI,EXEC,SCRIPT FLUSH,SCRIPT LOAD,EVAL,EVALSHA. and the following commandsRPOPLPUSH,SDIFFSTORE,SINTERSTORE,SMOVE,ZINTERSTORE,ZUNIONSTORE,DEL,UNLINK,RENAME,RENAMENX,PFMERGE,PFCOUNT,MSETNX,BRPOPLPUSH...
In #9389, we add a new cluster-port config and make cluster bus port configurable, and currently redis-cli --cluster create/add-node doesn't support with a configurable cluster-port instance. Becau...
–eval <file> Send an EVAL command using the Lua script at <file>. –ldb Used with –eval enable the Redis Lua debugger. –ldb-sync-mode Like –ldb but uses the synchronous Lua debugger, in this mode the server is blocked and script changes are ...
this mode the server is blocked and script changes are are not rolled back from the server memory. --help Output this help and exit. --version Output version and exit. Examples: cat /etc/passwd | redis-cli -x set mypasswd redis-cli get mypasswd ...