$endPoints Memcached end points. * @param string $prefixKey Prefix to apply to keys. * @param string $persistName Persistent connection name. * @param bool $useBinaryProto Use the binary protocol. * @param bool $enableCompression Use compression. * @param bool $tcpNoDelay Disable Nagle's algorithm. */ public function __construct( private array $endPoints, private string $prefixKey, private string $persistName, private bool $useBinaryProto, private bool $enableCompression, private bool $tcpNoDelay, ) {} /** * Gets server endpoints. * * @return array */ public function getEndPoints(): array { return $this->endPoints; } /** * A prefix that gets applied to every key. * * @return string */ public function getPrefixKey(): string { return $this->prefixKey; } /** * Whether the connection should be persistent. * * @return bool */ public function isPersistent(): bool { return $this->persistName !== ''; } /** * Name of persistent connection, will return null if disabled. * * @return ?string */ public function getPersistentName(): ?string { return $this->persistName === '' ? null : $this->persistName; } /** * Whether the binary protocol should be used rather than ASCII. * * @return bool */ public function shouldUseBinaryProtocol(): bool { return $this->useBinaryProto; } /** * Whether compression should be applied. * * @return bool */ public function shouldEnableCompression(): bool { return $this->enableCompression; } /** * Whether nagle's algorithm should be disabled on the connection. * * @return bool */ public function shouldTcpNoDelay(): bool { return $this->tcpNoDelay; } }