Methods
Get compress min savings
getAutoCompressMinSavings(string $id) : float | null
Parameters
$id
string
Exceptions
Returns
float
null
Get compress threshold
getAutoCompressThreshold(string $id) : int | null
Parameters
$id
string
Exceptions
Returns
int
null
Get callback for server connection failures
getFailureCallback(string $id) : \Zend\Cache\Storage\Adapter\callable
Parameters
$id
string
Exceptions
Returns
\Zend\Cache\Storage\Adapter\callable
Gets a memcache resource
getResource(string $id) : \Memcache
Parameters
$id
string
Exceptions
Returns
\Memcache
Get default server values
getServerDefaults(string $id) : array
Parameters
$id
string
Exceptions
Returns
array
Get servers
getServers(string $id) : array
Parameters
$id
string
Exceptions
Returns
array
array('host' =>
, 'port' => , 'weight' => )
Check if a resource exists
hasResource(string $id) : bool
Parameters
$id
string
Returns
bool
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
addServerToResource()
addServerToResource(\Memcache $resource, array $server, array $serverDefaults, \Zend\Cache\Storage\Adapter\callable | null $failureCallback)
Parameters
$resource
\Memcache
$server
array
$serverDefaults
array
$failureCallback
\Zend\Cache\Storage\Adapter\callablenull
Compare 2 normalized server arrays
(Compares only the host and the port)
compareServers(array $serverA, array $serverB) : int
Parameters
$serverA
array
$serverB
array
Returns
int
Normalize compress threshold options
normalizeAutoCompressThreshold(int | string | array | \ArrayAccess $threshold, float | string $minSavings)
Parameters
$threshold
intstringarray\ArrayAccess
$minSavings
floatstring
Normalize one server into the following format:
array(
'host' => <host>, 'port' => <port>, 'weight' => <weight>,
'status' => <status>, 'persistent' => <persistent>,
'timeout' => <timeout>, 'retry_interval' => <retryInterval>,
)
normalizeServer(string | array $server)
Parameters
$server
stringarray
Exceptions
normalizeServerDefaults()
normalizeServerDefaults(array $serverDefaults)
Parameters
$serverDefaults
array
Exceptions
Normalize a list of servers into the following format:
array(array('host' => <host>, 'port' => <port>, 'weight' => <weight>)[, .
normalizeServers(string | array $servers)
..])
Parameters
$servers
stringarray
Set compress threshold on a Memcache resource
setResourceAutoCompressThreshold(\Memcache $resource, int $threshold, float $minSavings)
Parameters
$resource
\Memcache
$threshold
int
$minSavings
float
Properties
Failure callback per resource
$failureCallbacks : \Zend\Cache\Storage\Adapter\callable[]
Registered resources
$resources : array
Default server values per resource
$serverDefaults : array