ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## evalSha ##### Description Evaluate a LUA script serverside, from the SHA1 hash of the script instead of the script itself. In order to run this command Redis will have to have already loaded the script, either by running it or via the SCRIPT LOAD command. ##### Parameters *script\_sha* string. The sha1 encoded hash of the script you want to run. *args* array, optional. Arguments to pass to the LUA script. *num\_keys* int, optional. The number of arguments that should go into the KEYS array, vs. the ARGV array when Redis spins the script ##### Return value Mixed. See EVAL ##### Examples ``` <pre class="calibre16">$script = 'return 1'; $sha = $redis->script('load', $script); $redis->evalSha($sha); // Returns 1 ``` ##