package Default

 Methods

Constructor

__construct(null|array|\Traversable|\Zend\Cache\Storage\Adapter\AdapterOptions $options = null

Parameters

$options

nullarray\Traversable\Zend\Cache\Storage\Adapter\AdapterOptions

Add an item.

addItem(string $key, mixed $value) : boolean
inherited_from \Zend\Cache\Storage\StorageInterface::addItem()

Parameters

$key

string

$value

mixed

Returns

boolean

Add multiple items.

addItems(array $keyValuePairs) : array
inherited_from \Zend\Cache\Storage\StorageInterface::addItems()

Parameters

$keyValuePairs

array

Returns

arrayArray of not stored keys

Set an item only if token matches

checkAndSetItem(mixed $token, string $key, mixed $value) : boolean

It uses the token received from getItem() to check if the item has changed before overwriting it.

inherited_from \Zend\Cache\Storage\StorageInterface::checkAndSetItem()

Parameters

$token

mixed

$key

string

$value

mixed

Returns

boolean

Remove items of given namespace

clearByNamespace(string $namespace) : boolean
inherited_from \Zend\Cache\Storage\ClearByNamespaceInterface::clearByNamespace()

Parameters

$namespace

string

Returns

boolean

Remove items matching given prefix

clearByPrefix(string $prefix) : boolean
inherited_from \Zend\Cache\Storage\ClearByPrefixInterface::clearByPrefix()

Parameters

$prefix

string

Returns

boolean

Remove items matching given tags.

clearByTags(array<mixed,string> $tags, boolean $disjunction = false) : boolean

If $disjunction only one of the given tags must match else all given tags must match.

inherited_from \Zend\Cache\Storage\TaggableInterface::clearByTags()

Parameters

$tags

array<mixed,string>

$disjunction

boolean

Returns

boolean

Remove expired items

clearExpired() : boolean
inherited_from \Zend\Cache\Storage\ClearExpiredInterface::clearExpired()

Returns

boolean

Decrement an item.

decrementItem(string $key, integer $value) : integer | boolean
inherited_from \Zend\Cache\Storage\StorageInterface::decrementItem()

Parameters

$key

string

$value

integer

Returns

integerbooleanThe new value on success, false on failure

Decrement multiple items.

decrementItems(array $keyValuePairs) : array
inherited_from \Zend\Cache\Storage\StorageInterface::decrementItems()

Parameters

$keyValuePairs

array

Returns

arrayAssociative array of keys and new values

Flush the whole storage

flush() : boolean
inherited_from \Zend\Cache\Storage\FlushableInterface::flush()

Returns

boolean

Get available space in bytes

getAvailableSpace() : integer | float
inherited_from \Zend\Cache\Storage\AvailableSpaceCapableInterface::getAvailableSpace()

Returns

integerfloat

Capabilities of this storage

getCapabilities() : \Zend\Cache\Storage\Capabilities
inherited_from \Zend\Cache\Storage\StorageInterface::getCapabilities()

Returns

\Zend\Cache\Storage\Capabilities

Get an item.

getItem(string $key, boolean $success = null, mixed $casToken = null) : mixed
inherited_from \Zend\Cache\Storage\StorageInterface::getItem()

Parameters

$key

string

$success

boolean

$casToken

mixed

Returns

mixedData on success, null on failure

Get multiple items.

getItems(array $keys) : array
inherited_from \Zend\Cache\Storage\StorageInterface::getItems()

Parameters

$keys

array

Returns

arrayAssociative array of keys and values

Get the storage iterator

getIterator() : \Zend\Cache\Storage\Adapter\KeyListIterator

Returns

\Zend\Cache\Storage\Adapter\KeyListIterator

Get multiple metadata

getMetadatas(array $keys) : array
inherited_from \Zend\Cache\Storage\StorageInterface::getMetadatas()

Parameters

$keys

array

Returns

arrayAssociative array of keys and metadata

Get options

getOptions() : \Zend\Cache\Storage\Adapter\AdapterOptions
inherited_from \Zend\Cache\Storage\StorageInterface::getOptions()

Returns

\Zend\Cache\Storage\Adapter\AdapterOptions

Get tags of an item by given key

getTags(string $key) : array<mixed,string> | FALSE
inherited_from \Zend\Cache\Storage\TaggableInterface::getTags()

Parameters

$key

string

Returns

array<mixed,string>FALSE

Get total space in bytes

getTotalSpace() : integer | float
inherited_from \Zend\Cache\Storage\TotalSpaceCapableInterface::getTotalSpace()

Returns

integerfloat

Test if an item exists.

hasItem(string $key) : boolean
inherited_from \Zend\Cache\Storage\StorageInterface::hasItem()

Parameters

$key

string

Returns

boolean

Test multiple items.

hasItems(array $keys) : array
inherited_from \Zend\Cache\Storage\StorageInterface::hasItems()

Parameters

$keys

array

Returns

arrayArray of found keys

Increment an item.

incrementItem(string $key, integer $value) : integer | boolean
inherited_from \Zend\Cache\Storage\StorageInterface::incrementItem()

Parameters

$key

string

$value

integer

Returns

integerbooleanThe new value on success, false on failure

Increment multiple items.

incrementItems(array $keyValuePairs) : array
inherited_from \Zend\Cache\Storage\StorageInterface::incrementItems()

Parameters

$keyValuePairs

array

Returns

arrayAssociative array of keys and new values

Optimize the storage

optimize() : boolean
inherited_from \Zend\Cache\Storage\OptimizableInterface::optimize()

Returns

boolean

Remove an item.

removeItem(string $key) : boolean
inherited_from \Zend\Cache\Storage\StorageInterface::removeItem()

Parameters

$key

string

Returns

boolean

Remove multiple items.

removeItems(array $keys) : array
inherited_from \Zend\Cache\Storage\StorageInterface::removeItems()

Parameters

$keys

array

Returns

arrayArray of not removed keys

Replace an existing item.

replaceItem(string $key, mixed $value) : boolean
inherited_from \Zend\Cache\Storage\StorageInterface::replaceItem()

Parameters

$key

string

$value

mixed

Returns

boolean

Replace multiple existing items.

replaceItems(array $keyValuePairs) : array
inherited_from \Zend\Cache\Storage\StorageInterface::replaceItems()

Parameters

$keyValuePairs

array

Returns

arrayArray of not stored keys

Store an item.

setItem(string $key, mixed $value) : boolean
inherited_from \Zend\Cache\Storage\StorageInterface::setItem()

Parameters

$key

string

$value

mixed

Returns

boolean

Store multiple items.

setItems(array $keyValuePairs) : array
inherited_from \Zend\Cache\Storage\StorageInterface::setItems()

Parameters

$keyValuePairs

array

Returns

arrayArray of not stored keys

Set options.

setOptions(array|\Traversable|\Zend\Cache\Storage\Adapter\AdapterOptions $options) : \Zend\Cache\Storage\StorageInterface
inherited_from \Zend\Cache\Storage\StorageInterface::setOptions()

Parameters

$options

array\Traversable\Zend\Cache\Storage\Adapter\AdapterOptions

Returns

\Zend\Cache\Storage\StorageInterfaceFluent interface

Set tags to an item by given key.

setTags(string $key, array<mixed,string> $tags) : boolean

An empty array will remove all tags.

inherited_from \Zend\Cache\Storage\TaggableInterface::setTags()

Parameters

$key

string

$tags

array<mixed,string>

Returns

boolean

Reset lifetime of an item

touchItem(string $key) : boolean
inherited_from \Zend\Cache\Storage\StorageInterface::touchItem()

Parameters

$key

string

Returns

boolean

Reset lifetime of multiple items.

touchItems(array $keys) : array
inherited_from \Zend\Cache\Storage\StorageInterface::touchItems()

Parameters

$keys

array

Returns

arrayArray of not updated keys

 Properties

 

Capabilities of this adapter

$capabilities : null | \Zend\Cache\Storage\Capabilities

Default

null
 

Marker to change capabilities

$capabilityMarker : null | object

Default

 

options

$options : null | \Zend\Cache\Storage\Adapter\AdapterOptions

Default