脚本加载
Syntax
SCRIPT LOAD script
- Available since:
- 2.6.0
- Time complexity:
- O(N) with N being the length in bytes of the script body.
- ACL categories:
-
@slow
,@scripting
,
将脚本加载到脚本缓存中,但不执行它。
指定的命令加载到脚本缓存后,可以使用EVALSHA
与脚本的正确SHA1摘要一起调用,就像第一次成功调用EVAL
后一样。
脚本保证永远保留在脚本缓存中(除非调用SCRIPT FLUSH
)。
即使脚本已经存在于脚本缓存中,该命令的工作方式也相同。