These are options specific to the Memcache 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

Get compress min savings

getAutoCompressMinSavings() : \Zend\Cache\Exception\RuntimeException

Returns

\Zend\Cache\Exception\RuntimeException

Get compress threshold

getAutoCompressThreshold() : integer | null

Returns

integernull

Is compressed writes turned on?

getCompression() : boolean

Returns

boolean

Get callback for server connection failures

getFailureCallback() : callable

Returns

callable

Get key pattern

getKeyPattern() : string
Inherited

Returns

string

Get namespace

getNamespace() : string
Inherited

Returns

string

Get namespace separator

getNamespaceSeparator() : string

Returns

string

If reading data from cache enabled.

getReadable() : boolean
Inherited

Returns

boolean

Get the memcache resource id

getResourceId() : string

Returns

string

Get the memcache resource manager

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

Returns

\Zend\Cache\Storage\Adapter\MemcacheResourceManager

Get default server values

getServerDefaults() : array

Returns

array

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 compress min savings option

setAutoCompressMinSavings(float|string|null $minSavings) : \Zend\Cache\Storage\Adapter\MemcacheOptions

Parameters

$minSavings

floatstringnull

Returns

\Zend\Cache\Storage\Adapter\MemcacheOptions

Set compress threshold

setAutoCompressThreshold(integer|string|array|\ArrayAccess|null $threshold) : \Zend\Cache\Storage\Adapter\MemcacheOptions

Parameters

$threshold

integerstringarray\ArrayAccessnull

Returns

\Zend\Cache\Storage\Adapter\MemcacheOptions

Set whether compressed writes are turned on or not

setCompression(boolean $compression) : \Zend\Cache\Storage\Adapter\MemcacheOptions
fluent This method is part of a fluent interface and will return the same instance

Parameters

$compression

boolean

Returns

\Zend\Cache\Storage\Adapter\MemcacheOptions

Set callback for server connection failures

setFailureCallback(callable $callback) : \Zend\Cache\Storage\Adapter\MemcacheOptions
fluent This method is part of a fluent interface and will return the same instance

Parameters

$callback

callable

Returns

\Zend\Cache\Storage\Adapter\MemcacheOptions

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 namespace.

setNamespace(string $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\MemcacheOptions

Parameters

$namespaceSeparator

string

Returns

\Zend\Cache\Storage\Adapter\MemcacheOptions

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 memcache resource id

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

Parameters

$resourceId

string

Returns

\Zend\Cache\Storage\Adapter\MemcacheOptions

Set the memcache resource manager to use

setResourceManager(null|\Zend\Cache\Storage\Adapter\MemcacheResourceManager $resourceManager = null) : \Zend\Cache\Storage\Adapter\MemcacheOptions

Parameters

$resourceManager

null\Zend\Cache\Storage\Adapter\MemcacheResourceManager

Returns

\Zend\Cache\Storage\Adapter\MemcacheOptions

Set default server values

setServerDefaults(array $serverDefaults) : \Zend\Cache\Storage\Adapter\MemcacheOptions

Parameters

$serverDefaults

array

Returns

\Zend\Cache\Storage\Adapter\MemcacheOptions

Sets a list of memcache servers to add on initialize

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

Parameters

$servers

stringarray

list of servers

Exceptions

\Zend\Cache\Exception\InvalidArgumentException

Returns

\Zend\Cache\Storage\Adapter\MemcacheOptions

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

 

Enable compression when data is written

$compression : boolean

Default

false
 

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 memcache resource manager

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

Default

 

TTL option

$ttl : integer | float

Default

0
 

Writable option

$writable : boolean

Default

true