Skip to content

Commit 09a66d5

Browse files
committed
[12.x] keys for PredisClusterConnection in RedisTagSet
1 parent b2394c8 commit 09a66d5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Illuminate/Redis/Connections/PredisClusterConnection.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,18 @@ public function flushAll()
3535
$node->executeCommand(tap(new FLUSHALL())->setArguments(func_get_args()));
3636
}
3737
}
38+
39+
/**
40+
* Flush the selected Redis database on all master nodes.
41+
*
42+
* @return array
43+
*/
44+
public function keys(string $pattern)
45+
{
46+
$keys = [];
47+
foreach ($this->client as $node) {
48+
$keys[] = $node->keys($pattern);
49+
}
50+
return array_merge(...$keys);
51+
}
3852
}

0 commit comments

Comments
 (0)