FileAccess Orion

MemcacheOptions extends AdapterOptions
in package

These are options specific to the Memcache adapter

Table of Contents

$__prioritizedProperties__  : array<string|int, string>
Prioritized properties ordered by prio to be set first in case a bulk of options sets set at once
$__strictMode__  : bool
We use the __ prefix to avoid collisions with properties in user-implementations.
$adapter  : null|StorageInterface
The adapter using these options
$compression  : bool
Enable compression when data is written
$keyPattern  : string
Validate key against pattern
$namespace  : string
Namespace option
$namespaceSeparator  : string
The namespace separator
$readable  : bool
Readable option
$resourceId  : string
The resource id of the resource manager
$resourceManager  : null|MemcacheResourceManager
The memcache resource manager
$ttl  : int|float
TTL option
$writable  : bool
Writable option
__construct()  : mixed
Constructor
__get()  : mixed
Get a configuration property
__isset()  : bool
Test if a configuration property is null
__set()  : void
Set a configuration property
__unset()  : void
Set a configuration property to NULL
getAutoCompressMinSavings()  : mixed
Get compress min savings
getAutoCompressThreshold()  : int|null
Get compress threshold
getCompression()  : bool
Is compressed writes turned on?
getFailureCallback()  : callable
Get callback for server connection failures
getKeyPattern()  : string
Get key pattern
getNamespace()  : string
Get namespace
getNamespaceSeparator()  : string
Get namespace separator
getReadable()  : bool
If reading data from cache enabled.
getResourceId()  : string
Get the memcache resource id
getResourceManager()  : MemcacheResourceManager
Get the memcache resource manager
getServerDefaults()  : array<string|int, mixed>
Get default server values
getServers()  : array<string|int, mixed>
Get Servers
getTtl()  : float
Get time to live.
getWritable()  : bool
If writing data to cache enabled.
setAdapter()  : AdapterOptions
Adapter using this instance
setAutoCompressMinSavings()  : MemcacheOptions
Set compress min savings option
setAutoCompressThreshold()  : MemcacheOptions
Set compress threshold
setCompression()  : $this
Set whether compressed writes are turned on or not
setFailureCallback()  : $this
Set callback for server connection failures
setFromArray()  : AbstractOptions
Set one or more configuration properties
setKeyPattern()  : AdapterOptions
Set key pattern
setNamespace()  : AdapterOptions
Set namespace.
setNamespaceSeparator()  : MemcacheOptions
Set namespace separator
setReadable()  : AdapterOptions
Enable/Disable reading data from cache.
setResourceId()  : MemcacheOptions
Set the memcache resource id
setResourceManager()  : MemcacheOptions
Set the memcache resource manager to use
setServerDefaults()  : MemcacheOptions
Set default server values
setServers()  : MemcacheOptions
Sets a list of memcache servers to add on initialize
setTtl()  : AdapterOptions
Set time to live.
setWritable()  : AdapterOptions
Enable/Disable writing data to cache.
toArray()  : array<string|int, mixed>
Cast to array
normalizeTtl()  : void
Validates and normalize a TTL.
triggerOptionEvent()  : void
Triggers an option event if this options instance has a connection to an adapter implements EventsCapableInterface.

Properties

$__prioritizedProperties__

Prioritized properties ordered by prio to be set first in case a bulk of options sets set at once

protected array<string|int, string> $__prioritizedProperties__ = ['resource_manager', 'resource_id']

$__strictMode__

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

protected bool $__strictMode__ = true

$compression

Enable compression when data is written

protected bool $compression = false

$keyPattern

Validate key against pattern

protected string $keyPattern = ''

$namespace

Namespace option

protected string $namespace = 'zfcache'

$namespaceSeparator

The namespace separator

protected string $namespaceSeparator = ':'

$resourceId

The resource id of the resource manager

protected string $resourceId = 'default'

$ttl

TTL option

protected int|float $ttl = 0

0 means infinite or maximum of adapter

Methods

__construct()

Constructor

public __construct([array<string|int, mixed>|Traversable|null $options = null ]) : mixed
Parameters
$options : array<string|int, mixed>|Traversable|null = null
Return values
mixed

__get()

Get a configuration property

public __get(string $key) : mixed
Parameters
$key : string
Tags
see
ParameterObject::__get()
throws
BadMethodCallException
Return values
mixed

__isset()

Test if a configuration property is null

public __isset(string $key) : bool
Parameters
$key : string
Tags
see
ParameterObject::__isset()
Return values
bool

__set()

Set a configuration property

public __set(string $key, mixed $value) : void
Parameters
$key : string
$value : mixed
Tags
see
ParameterObject::__set()
throws
BadMethodCallException
Return values
void

__unset()

Set a configuration property to NULL

public __unset(string $key) : void
Parameters
$key : string
Tags
see
ParameterObject::__unset()
throws
InvalidArgumentException
Return values
void

getAutoCompressMinSavings()

Get compress min savings

public getAutoCompressMinSavings() : mixed
Tags
throws
RuntimeException
Return values
mixed

getAutoCompressThreshold()

Get compress threshold

public getAutoCompressThreshold() : int|null
Return values
int|null

getCompression()

Is compressed writes turned on?

public getCompression() : bool
Return values
bool

getFailureCallback()

Get callback for server connection failures

public getFailureCallback() : callable
Return values
callable

getKeyPattern()

Get key pattern

public getKeyPattern() : string
Return values
string

getNamespace()

Get namespace

public getNamespace() : string
Return values
string

getNamespaceSeparator()

Get namespace separator

public getNamespaceSeparator() : string
Return values
string

getReadable()

If reading data from cache enabled.

public getReadable() : bool
Return values
bool

getResourceId()

Get the memcache resource id

public getResourceId() : string
Return values
string

getServerDefaults()

Get default server values

public getServerDefaults() : array<string|int, mixed>
Return values
array<string|int, mixed>

getServers()

Get Servers

public getServers() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTtl()

Get time to live.

public getTtl() : float
Return values
float

getWritable()

If writing data to cache enabled.

public getWritable() : bool
Return values
bool

setAutoCompressMinSavings()

Set compress min savings option

public setAutoCompressMinSavings(float|string|null $minSavings) : MemcacheOptions
Parameters
$minSavings : float|string|null
Return values
MemcacheOptions

setAutoCompressThreshold()

Set compress threshold

public setAutoCompressThreshold(int|string|array<string|int, mixed>|ArrayAccess|null $threshold) : MemcacheOptions
Parameters
$threshold : int|string|array<string|int, mixed>|ArrayAccess|null
Return values
MemcacheOptions

setCompression()

Set whether compressed writes are turned on or not

public setCompression(bool $compression) : $this
Parameters
$compression : bool
Return values
$this

setFailureCallback()

Set callback for server connection failures

public setFailureCallback(callable $callback) : $this
Parameters
$callback : callable
Return values
$this

setServerDefaults()

Set default server values

public setServerDefaults(array<string|int, mixed> $serverDefaults) : MemcacheOptions
Parameters
$serverDefaults : array<string|int, mixed>
Return values
MemcacheOptions

toArray()

Cast to array

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

triggerOptionEvent()

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

protected triggerOptionEvent(string $optionName, mixed $optionValue) : void
Parameters
$optionName : string
$optionValue : mixed
Return values
void

Search results