protected function getLongestSize()
    {
        if ($this->longest) {
            return $this->longest;
        }

        // Build possible handles
        $strings = [];
        $connections = $this->connections->getActiveConnections();
        $stages = (array) $this->connections->getAvailableStages() ?: [''];
        foreach ($connections as $handle => $connection) {
            $servers = $connection->getConnectionKey()->servers;
            if (count($servers) > 1) {
                $handle .= '/'.count($servers);
            }

            foreach ($stages as $stage) {
                $strings[] = trim($handle.'/'.$stage, '/');
            }
        }

        // Get longest string
        $strings = array_map('strlen', $strings);
        $strings = $strings ? max($strings) : 0;

        // Cache value
        $this->longest = $strings;

        return $this->longest;
    }