W3cubDocs

/Symfony 4.1

MemcachedTrait

trait MemcachedTrait

Methods

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

Creates a Memcached instance.

doSave(array $values, $lifetime)

{@inheritdoc}

doFetch(array $ids)

{@inheritdoc}

doHave($id)

{@inheritdoc}

doDelete(array $ids)

{@inheritdoc}

doClear($namespace)

{@inheritdoc}

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

protected doSave(array $values, $lifetime)

{@inheritdoc}

Parameters

array $values
$lifetime

protected doFetch(array $ids)

{@inheritdoc}

Parameters

array $ids

protected doHave($id)

{@inheritdoc}

Parameters

$id

protected doDelete(array $ids)

{@inheritdoc}

Parameters

array $ids

protected doClear($namespace)

{@inheritdoc}

Parameters

$namespace

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