src/Factory/MemcachedFactory.php
public function getAdapter(array $config)
    {
        $client = new Memcached($config['persistent_id']);
        $client->addServer($config['host'], $config['port']);

        foreach ($config['redundant_servers'] as $server) {
            if (!isset($server['host'])) {
                continue;
            }
            $port = $config['port'];
            if (isset($server['port'])) {
                $port = $server['port'];
            }
            $client->addServer($server['host'], $port);
        }

        foreach ($config['driver_options'] as $constant => $value) {
            $client->setOption(constant($constant), $value);
        }

        $pool = new MemcachedCachePool($client);

        if (null !== $config['pool_namespace']) {
            $pool = new NamespacedCachePool($pool, $config['pool_namespace']);
        }

        return $pool;
    }
public function getAdapter(array $config)
    {
        $client = new Memcached($config['persistent_id']);
        $client->addServer($config['host'], $config['port']);

        foreach ($config['redundant_servers'] as $server) {
            if (!isset($server['host'])) {
                continue;
            }
            $port = $config['port'];
            if (isset($server['port'])) {
                $port = $server['port'];
            }
            $client->addServer($server['host'], $port);
        }

        foreach ($config['driver_options'] as $constant => $value) {
            $client->setOption(constant($constant), $value);
        }

        $pool = new MemcachedCachePool($client);

        if (null !== $config['pool_namespace']) {
            $pool = new NamespacedCachePool($pool, $config['pool_namespace']);
        }

        return $pool;
    }
{@inheritdoc}