在线工具
网站地图    收藏    合作   
<

快捷菜单 返回顶部

php操作redis

返回上层

系统和通用函数 - 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

$script = 'return 1';

$sha = $redis->script('load', $script);

$redis->evalSha($sha); // Returns 1



来源:https://www.daixiaorui.com/

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com