$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 { $this->lazyClient =
$client;
} parent::
__construct($namespace,
$defaultLifetime);
$this->
enableVersioning();
$this->marshaller =
$marshaller ??
new DefaultMarshaller();
} /**
* @return bool
*/
public static function isSupported() { return \
extension_loaded('memcached'
) &&
version_compare(phpversion('memcached'
), '3.1.6', '>='
);
}