<?php
  require_once "predis-0.8/autoload.php";
  $config['schema'] = 'tcp';
  $config['host']= "192.168.1.7";
  $config['port'] = 6379;
  $redis = new Predis\Client($config);
  class wode extends Predis\Command\ScriptedCommand {
    public function getKyesCount(){
      return false;
    }
    public function getScript(){
      return 
<<<LUA
local result = {}
for i,v in ipairs(KEYS) do
  result[i] = redis.call("HGETALL",v)
end
return result
LUA;
    }
  }
  $redis->getProfile()->defineCommand('ri','wode');
  $a = $redis->ri(0,'tt1','tt2','tt3');
  print_r($a);
?>

相关文章:

  • 2021-06-13
  • 2022-12-23
  • 2021-07-13
  • 2021-12-29
  • 2021-09-25
  • 2022-12-23
  • 2021-05-03
猜你喜欢
  • 2021-07-07
  • 2022-12-23
  • 2021-05-28
  • 2021-06-20
  • 2022-12-23
  • 2021-04-23
相关资源
相似解决方案