脚本加载

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)。

即使脚本已经存在于脚本缓存中,该命令的工作方式也相同。

有关EVAL脚本的更多信息,请参阅Eval脚本介绍

RESP2/RESP3 回复

Bulk string reply: the SHA1 digest of the script added into the script cache.
RATE THIS PAGE
Back to top ↑