This commit is contained in:
2024-11-05 12:10:06 +08:00
commit 6b687feee2
3995 changed files with 418583 additions and 0 deletions
@@ -0,0 +1,25 @@
<?php
namespace Illuminate\Redis\Connections;
use Predis\Command\Redis\FLUSHDB;
use Predis\Command\ServerFlushDatabase;
class PredisClusterConnection extends PredisConnection
{
/**
* Flush the selected Redis database on all cluster nodes.
*
* @return void
*/
public function flushdb()
{
$command = class_exists(ServerFlushDatabase::class)
? ServerFlushDatabase::class
: FLUSHDB::class;
foreach ($this->client as $node) {
$node->executeCommand(tap(new $command)->setArguments(func_get_args()));
}
}
}