trait MemcachedTrait

Methods

static 
isSupported()

No description

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

Creates a Memcached instance.

doSave(array $values, $lifetime)

{@inheritdoc}

doFetch(array $ids)

{@inheritdoc}

doHave($id)

{@inheritdoc}

doDelete(array $ids)

{@inheritdoc}

doClear($namespace)

{@inheritdoc}

Details

at line 35
static isSupported()

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

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' - [['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

at line 196
protected doSave(array $values, $lifetime)

{@inheritdoc}

Parameters

array $values
$lifetime

at line 213
protected doFetch(array $ids)

{@inheritdoc}

Parameters

array $ids

at line 237
protected doHave($id)

{@inheritdoc}

Parameters

$id

at line 245
protected doDelete(array $ids)

{@inheritdoc}

Parameters

array $ids

at line 261
protected doClear($namespace)

{@inheritdoc}

Parameters

$namespace