This is a resource manager for memcache

 Methods

Add one server

addServer(string $id, string | array $server) : \Zend\Cache\Storage\Adapter\MemcacheResourceManager

Parameters

$id

string

$server

stringarray

Returns

Add servers

addServers(string $id, string | array $servers) : \Zend\Cache\Storage\Adapter\MemcacheResourceManager

Parameters

$id

string

$servers

stringarray

Returns

Get compress min savings

getAutoCompressMinSavings(string $id) : float | null

Parameters

$id

string

Exceptions

\Zend\Cache\Exception\RuntimeException

Returns

floatnull

Get compress threshold

getAutoCompressThreshold(string $id) : int | null

Parameters

$id

string

Exceptions

\Zend\Cache\Exception\RuntimeException

Returns

intnull

Get callback for server connection failures

getFailureCallback(string $id) : \Zend\Cache\Storage\Adapter\callable

Parameters

$id

string

Exceptions

\Zend\Cache\Exception\RuntimeException

Returns

\Zend\Cache\Storage\Adapter\callable

Gets a memcache resource

getResource(string $id) : \Memcache

Parameters

$id

string

Exceptions

\Zend\Cache\Exception\RuntimeException

Returns

\Memcache

Get default server values

getServerDefaults(string $id) : array

Parameters

$id

string

Exceptions

\Zend\Cache\Exception\RuntimeException

Returns

array

Get servers

getServers(string $id) : array

Parameters

$id

string

Exceptions

\Zend\Cache\Exception\RuntimeException

Returns

arrayarray('host' => , 'port' => , 'weight' => )

Check if a resource exists

hasResource(string $id) : bool

Parameters

$id

string

Returns

bool

Remove a resource

removeResource(string $id) : \Zend\Cache\Storage\Adapter\MemcacheResourceManager

Set compress min savings

setAutoCompressMinSavings(string $id, float | string | null $minSavings) : \Zend\Cache\Storage\Adapter\MemcacheResourceManager

Parameters

$id

string

$minSavings

floatstringnull

Exceptions

\Zend\Cache\Exception\RuntimeException

Returns

Set compress threshold

setAutoCompressThreshold(string $id, int | string | array | \ArrayAccess | null $threshold, float | string | bool $minSavings) : \Zend\Cache\Storage\Adapter\MemcacheResourceManager

Parameters

$id

string

$threshold

intstringarray\ArrayAccessnull

$minSavings

floatstringbool

Returns

Set callback for server connection failures

setFailureCallback(string $id, \Zend\Cache\Storage\Adapter\callable | null $failureCallback) : \Zend\Cache\Storage\Adapter\MemcacheResourceManager

Parameters

$id

string

$failureCallback

\Zend\Cache\Storage\Adapter\callablenull

Returns

Set a resource

setResource(string $id, array | \Traversable | \Memcache $resource, \Zend\Cache\Storage\Adapter\callable $failureCallback, array | \Traversable $serverDefaults) : \Zend\Cache\Storage\Adapter\MemcacheResourceManager

Parameters

$id

string

$resource

array\Traversable\Memcache

$failureCallback

\Zend\Cache\Storage\Adapter\callable

$serverDefaults

array\Traversable

Returns

Set default server values array( 'persistent' => <persistent>, 'weight' => <weight>, 'timeout' => <timeout>, 'retry_interval' => <retryInterval>, )

setServerDefaults(string $id, array $serverDefaults) : \Zend\Cache\Storage\Adapter\MemcacheResourceManager

Parameters

$id

string

$serverDefaults

array

Returns

 Properties