These are options specific to the Memcached adapter

package Default
inherited_from \Zend\Cache\Storage\Adapter\AdapterOptions

 Methods

Constructor

__construct(array|\Traversable|null $options = null
Inherited

Parameters

$options

array\Traversablenull

Get a configuration property

__get(string $key) : mixed
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__get()

Parameters

$key

string

Exceptions

\Zend\Stdlib\Exception\BadMethodCallException

Returns

mixed

Test if a configuration property is null

__isset(string $key) : boolean
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__isset()

Parameters

$key

string

Returns

boolean

Set a configuration property

__set(string $key, mixed $value) : void
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__set()

Parameters

$key

string

$value

mixed

Exceptions

\Zend\Stdlib\Exception\BadMethodCallException

Set a configuration property to NULL

__unset(string $key) : void
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__unset()

Parameters

$key

string

Exceptions

\Zend\Stdlib\Exception\InvalidArgumentException

Add a server to the list

addServer(string $host, integer $port = 11211, integer $weight = 0) : \Zend\Cache\Storage\Adapter\MemcachedOptions
deprecated Please use the resource manager instead

Parameters

$host

string

$port

integer

$weight

integer

Returns

\Zend\Cache\Storage\Adapter\MemcachedOptions

Get key pattern

getKeyPattern() : string
Inherited

Returns

string

Get libmemcached option

getLibOption(string|integer $key) : mixed
link http://php.net/manual/memcached.constants.php
deprecated Please use lib_options or the resource manager instead

Parameters

$key

stringinteger

Returns

mixed

Get libmemcached options

getLibOptions() : array

Get memcached resource to share

getMemcachedResource() : \Memcached
deprecated Please use the resource manager instead

Returns

\Memcached

Get namespace

getNamespace() : string
Inherited

Returns

string

Get namespace separator

getNamespaceSeparator() : string

Returns

string

Get the persistent id

getPersistentId() : string

Returns

string

If reading data from cache enabled.

getReadable() : boolean
Inherited

Returns

boolean

Get the memcached resource id

getResourceId() : string

Returns

string

Get the memcached resource manager

getResourceManager() : \Zend\Cache\Storage\Adapter\MemcachedResourceManager

Returns

\Zend\Cache\Storage\Adapter\MemcachedResourceManager

Get Servers

getServers() : array

Returns

array

Get time to live.

getTtl() : float
Inherited

Returns

float

If writing data to cache enabled.

getWritable() : boolean
Inherited

Returns

boolean

Adapter using this instance

setAdapter(\Zend\Cache\Storage\StorageInterface|null $adapter = null) : \Zend\Cache\Storage\Adapter\AdapterOptions
Inherited

Parameters

$adapter

\Zend\Cache\Storage\StorageInterfacenull

Returns

\Zend\Cache\Storage\Adapter\AdapterOptions

Set one or more configuration properties

setFromArray(array|\Traversable|\Zend\Stdlib\AbstractOptions $options) : \Zend\Stdlib\AbstractOptions
Inherited

Parameters

$options

array\Traversable\Zend\Stdlib\AbstractOptions

Exceptions

\Zend\Stdlib\Exception\InvalidArgumentException

Returns

\Zend\Stdlib\AbstractOptionsProvides fluent interface

Set key pattern

setKeyPattern(null|string $keyPattern) : \Zend\Cache\Storage\Adapter\AdapterOptions
Inherited

Parameters

$keyPattern

nullstring

Exceptions

\Zend\Cache\Exception\InvalidArgumentException

Returns

\Zend\Cache\Storage\Adapter\AdapterOptions

Set libmemcached option

setLibOption(string|integer $key, mixed $value) : \Zend\Cache\Storage\Adapter\MemcachedOptions
link http://php.net/manual/memcached.constants.php
deprecated Please use lib_options or the resource manager instead

Parameters

$key

stringinteger

$value

mixed

Returns

\Zend\Cache\Storage\Adapter\MemcachedOptions

Set libmemcached options

setLibOptions(array $libOptions) : \Zend\Cache\Storage\Adapter\MemcachedOptions
link http://php.net/manual/memcached.constants.php

Parameters

$libOptions

array

Returns

\Zend\Cache\Storage\Adapter\MemcachedOptions

A memcached resource to share

setMemcachedResource(null|\Memcached $memcachedResource = null) : \Zend\Cache\Storage\Adapter\MemcachedOptions
deprecated Please use the resource manager instead

Parameters

$memcachedResource

null\Memcached

Returns

\Zend\Cache\Storage\Adapter\MemcachedOptions

Set namespace.

setNamespace(string $namespace) 

The option Memcached::OPT_PREFIX_KEY will be used as the namespace. It can't be longer than 128 characters.

see
see
inherited_from \Zend\Cache\Storage\Adapter\AdapterOptions::setNamespace()

Parameters

$namespace

Set namespace.

setNamespace(string $namespace) : \Zend\Cache\Storage\Adapter\AdapterOptions
Inherited

Parameters

$namespace

string

Returns

\Zend\Cache\Storage\Adapter\AdapterOptions

Set namespace separator

setNamespaceSeparator(string $namespaceSeparator) : \Zend\Cache\Storage\Adapter\MemcachedOptions

Parameters

$namespaceSeparator

string

Returns

\Zend\Cache\Storage\Adapter\MemcachedOptions

Set the persistent id

setPersistentId(string $persistentId) : \Zend\Cache\Storage\Adapter\MemcachedOptions

Parameters

$persistentId

string

Returns

\Zend\Cache\Storage\Adapter\MemcachedOptions

Enable/Disable reading data from cache.

setReadable(boolean $readable) : \Zend\Cache\Storage\Adapter\AbstractAdapter
Inherited

Parameters

$readable

boolean

Returns

\Zend\Cache\Storage\Adapter\AbstractAdapter

Set the memcached resource id

setResourceId(string $resourceId) : \Zend\Cache\Storage\Adapter\MemcachedOptions

Parameters

$resourceId

string

Returns

\Zend\Cache\Storage\Adapter\MemcachedOptions

Set the memcached resource manager to use

setResourceManager(null|\Zend\Cache\Storage\Adapter\MemcachedResourceManager $resourceManager = null) : \Zend\Cache\Storage\Adapter\MemcachedOptions

Parameters

$resourceManager

null\Zend\Cache\Storage\Adapter\MemcachedResourceManager

Returns

\Zend\Cache\Storage\Adapter\MemcachedOptions

Set a list of memcached servers to add on initialize

setServers(string|array $servers) : \Zend\Cache\Storage\Adapter\MemcachedOptions

Parameters

$servers

stringarray

list of servers

Exceptions

\Zend\Cache\Exception\InvalidArgumentException

Returns

\Zend\Cache\Storage\Adapter\MemcachedOptions

Set time to live.

setTtl(integer|float $ttl) : \Zend\Cache\Storage\Adapter\AdapterOptions
Inherited

Parameters

$ttl

integerfloat

Returns

\Zend\Cache\Storage\Adapter\AdapterOptions

Enable/Disable writing data to cache.

setWritable(boolean $writable) : \Zend\Cache\Storage\Adapter\AdapterOptions
Inherited

Parameters

$writable

boolean

Returns

\Zend\Cache\Storage\Adapter\AdapterOptions

Cast to array

toArray() : array
Inherited

Returns

array

Validates and normalize a TTL.

normalizeTtl(integer|float $ttl) : void
Inherited

Parameters

$ttl

integerfloat

Exceptions

\Zend\Cache\Exception\InvalidArgumentException

Triggers an option event if this options instance has a connection to an adapter implements EventsCapableInterface.

triggerOptionEvent(string $optionName, mixed $optionValue) : void
Inherited

Parameters

$optionName

string

$optionValue

mixed

 Properties

 

We use the __ prefix to avoid collisions with properties in user-implementations.

$__strictMode__ : boolean

Default

true
 

The adapter using these options

$adapter : null | \Zend\Cache\Storage\StorageInterface

Default

 

Validate key against pattern

$keyPattern : string

Default

''
 

Namespace option

$namespace : string

Default

'zfcache'
 

The namespace separator

$namespaceSeparator : string

Default

':'
 

Readable option

$readable : boolean

Default

true
 

The resource id of the resource manager

$resourceId : string

Default

'default'
 

The memcached resource manager

$resourceManager : null | \Zend\Cache\Storage\Adapter\MemcachedResourceManager

Default

 

TTL option

$ttl : integer | float

Default

0
 

Writable option

$writable : boolean

Default

true