English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis Script Load command is used to add the script script to the script cache, but it does not execute the script immediately.
EVAL command will also add the script to the script cache, but it will immediately evaluate the input script.
If the given script is already in the cache, no operation is performed.
After the script is added to the cache, you can EVALSHA command, you can use the script SHA1 by calling this script with the checksum.
Scripts can be retained in the cache indefinitely until executed SCRIPT FLUSH to.
For more information on evaluating Lua scripts with Redis, please see EVAL Command.
The basic syntax of the redis Script Load command is as follows:
redis 127.0.0.1:6379> SCRIPT LOAD script
>= 2.6.0
Given script SHA1 Checksum
redis 127.0.0.1:6379> SCRIPT LOAD "return 1" "e0e1f9fabfc9d4800c877a703b823ac0578ff8db"