Class MemcacheResourceManager

Summary

Fully Qualified Name: Zend\Cache\Storage\Adapter\MemcacheResourceManager

Description

This is a resource manager for memcache

Methods

Name Description Defined By
addServer() Add one server MemcacheResourceManager
addServers() Add servers MemcacheResourceManager
getAutoCompressMinSavings() Get compress min savings MemcacheResourceManager
getAutoCompressThreshold() Get compress threshold MemcacheResourceManager
getFailureCallback() Get callback for server connection failures MemcacheResourceManager
getResource() Gets a memcache resource MemcacheResourceManager
getServerDefaults() Get default server values MemcacheResourceManager
getServers() Get servers MemcacheResourceManager
hasResource() Check if a resource exists MemcacheResourceManager
removeResource() Remove a resource MemcacheResourceManager
setAutoCompressMinSavings() Set compress min savings MemcacheResourceManager
setAutoCompressThreshold() Set compress threshold MemcacheResourceManager
setFailureCallback() Set callback for server connection failures MemcacheResourceManager
setResource() Set a resource MemcacheResourceManager
setServerDefaults() Set default server values array( 'persistent' => , 'weight' => , 'timeout' => , 'retry_interval' => , ) MemcacheResourceManager

Method Details

addServer()

Add one server

Parameter Name Type Description
$id string
$server string|array

Returns: \MemcacheResourceManager

addServers()

Add servers

Parameter Name Type Description
$id string
$servers string|array

Returns: \MemcacheResourceManager Provides a fluent interface

getAutoCompressMinSavings()

Get compress min savings

Parameter Name Type Description
$id string

Returns: float|null

getAutoCompressThreshold()

Get compress threshold

Parameter Name Type Description
$id string

Returns: int|null

getFailureCallback()

Get callback for server connection failures

Parameter Name Type Description
$id string

Returns: callable

getResource()

Gets a memcache resource

Parameter Name Type Description
$id string

Returns: \MemcacheResource

getServerDefaults()

Get default server values

Parameter Name Type Description
$id string

Returns: array

getServers()

Get servers

Parameter Name Type Description
$id string

Returns: array array('host' => <host>, 'port' => <port>, 'weight' => <weight>)

hasResource()

Check if a resource exists

Parameter Name Type Description
$id string

Returns: bool

removeResource()

Remove a resource

Parameter Name Type Description
$id string

Returns: \MemcacheResourceManager Provides a fluent interface

setAutoCompressMinSavings()

Set compress min savings

Parameter Name Type Description
$id string
$minSavings float|string|null

Returns: \MemcacheResourceManager Provides a fluent interface

setAutoCompressThreshold()

Set compress threshold

Parameter Name Type Description
$id string
$threshold int|string|array|\ArrayAccess|null
$minSavings float|string|bool

Returns: \MemcacheResourceManager Provides a fluent interface

setFailureCallback()

Set callback for server connection failures

Parameter Name Type Description
$id string
$failureCallback callable|null

Returns: \MemcacheResourceManager Provides a fluent interface

setResource()

Set a resource

Parameter Name Type Description
$id string
$resource array|\Traversable|\MemcacheResource
$failureCallback callable
$serverDefaults array|\Traversable

Returns: \MemcacheResourceManager Provides a fluent interface

setServerDefaults()

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

Parameter Name Type Description
$id string
$serverDefaults array

Returns: \MemcacheResourceManager Provides a fluent interface

Top