perf: 增加原生缓存

This commit is contained in:
Ying
2023-06-19 14:36:07 +08:00
parent 2b8f874450
commit 331d7b0582
1486 changed files with 105475 additions and 0 deletions

View File

@@ -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()));
}
}
}