MemcachedTrait

trait MemcachedTrait

Methods

static isSupported()
static Memcached createConnection(array[]|string|string[] $servers, array $options = array())

Creates a Memcached instance.

Details

static isSupported()

static Memcached createConnection(array[]|string|string[] $servers, array $options = array())

Creates a Memcached instance.

By default, the binary protocol, no block, and libketama compatible options are enabled.

Examples for servers: - 'memcached://user:pass@localhost?weight=33' - array(array('localhost', 11211, 33))

Parameters

array[]|string|string[] $servers An array of servers, a DSN, or an array of DSNs
array $options An array of options

Return Value

Memcached

Exceptions

ErrorException When invalid options or servers are provided

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Cache/Traits/MemcachedTrait.html