$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; }
redis scan迭代模糊匹配
猜你喜欢
转载自www.cnblogs.com/JimmyBright/p/9855081.html
今日推荐
周排行