Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Redis\Connections;
4
 
5
class PhpRedisClusterConnection extends PhpRedisConnection
6
{
7
    /**
8
     * Flush the selected Redis database on all master nodes.
9
     *
10
     * @return mixed
11
     */
12
    public function flushdb()
13
    {
14
        $arguments = func_get_args();
15
 
16
        $async = strtoupper((string) ($arguments[0] ?? null)) === 'ASYNC';
17
 
18
        foreach ($this->client->_masters() as $master) {
19
            $async
20
                ? $this->command('rawCommand', [$master, 'flushdb', 'async'])
21
                : $this->command('flushdb', [$master]);
22
        }
23
    }
24
}