$redis = new Redis();
$redis->connect('localhost', 6379);
 
$iterator = null;
while (true) {
    $keys = $redis->scan($iterator, 'test*');
    if ($keys === false) {//迭代结束,未找到匹配pattern的key
        return;
    }
    foreach ($keys as $key) {
        echo $key . PHP_EOL;
    }

 

scan 0 match a* count 2

相关文章:

  • 2022-12-23
  • 2021-12-10
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-22
  • 2022-01-11
  • 2021-11-22
  • 2021-07-11
  • 2021-12-27
  • 2021-11-21
相关资源
相似解决方案