public function __construct(\Memcached
$client, string
$namespace = '', int
$defaultLifetime = 0, MarshallerInterface
$marshaller = null
) { if (!
static::
isSupported()) { throw new CacheException('Memcached > 3.1.5 is required.'
);
} $this->maxIdLength = self::MAX_KEY_LENGTH;
if ('Memcached' ===
$client::
class) { $opt =
$client->
getOption(\Memcached::OPT_SERIALIZER
);
if (\Memcached::SERIALIZER_PHP !==
$opt && \Memcached::SERIALIZER_IGBINARY !==
$opt) { throw new CacheException('MemcachedAdapter: "serializer" option must be "php" or "igbinary".'
);
} $this->maxIdLength -= \
strlen($client->
getOption(\Memcached::OPT_PREFIX_KEY
));
$this->client =
$client;
} else {