src/M6Web/Component/Redis/Cache.php
public function flush()
    {
        $pattern = $this->getPatternKey();
        $arrReturn = $this->runOnAllRedisServer(
            function ($redis) use ($pattern) {
                $wasDeleted = 0;
                $allKeys = $redis->keys($pattern.'*'); // all keys started with the namespace
                if (count($allKeys)) {
                    $wasDeleted = $redis->del($allKeys);
                }

                return array($wasDeleted);
            }
        );

        return array_sum($arrReturn);
    }
public function flush()
    {
        $pattern = $this->getPatternKey();
        $arrReturn = $this->runOnAllRedisServer(
            function ($redis) use ($pattern) {
                $wasDeleted = 0;
                $allKeys = $redis->keys($pattern.'*'); // all keys started with the namespace
                if (count($allKeys)) {
                    $wasDeleted = $redis->del($allKeys);
                }

                return array($wasDeleted);
            }
        );

        return array_sum($arrReturn);
    }
use for debugging !

flush all keys in the namespace
@return integer number of deleted keys