Methods
Add an item.
addItem(string $key, mixed $value) : bool
Parameters
$key
string
$value
mixed
Exceptions
Returns
bool
Add multiple items.
addItems(array $keyValuePairs) : array
Parameters
$keyValuePairs
array
Exceptions
Returns
array
Array of not stored keys
Set an item only if token matches
checkAndSetItem(mixed $token, string $key, mixed $value) : bool
It uses the token received from getItem() to check if the item has
changed before overwriting it.
see |
\Zend\Cache\Storage\getItem() |
see |
\Zend\Cache\Storage\setItem() |
Parameters
$token
mixed
$key
string
$value
mixed
Exceptions
Returns
bool
Decrement an item.
decrementItem(string $key, int $value) : int | bool
Parameters
$key
string
$value
int
Exceptions
Returns
int
bool
The new value on success, false on failure
Decrement multiple items.
decrementItems(array $keyValuePairs) : array
Parameters
$keyValuePairs
array
Exceptions
Returns
array
Associative array of keys and new values
Get an item.
getItem(string $key, bool $success, mixed $casToken) : mixed
Parameters
$key
string
$success
bool
$casToken
mixed
Exceptions
Returns
mixed
Data on success, null on failure
Get multiple items.
getItems(array $keys) : array
Parameters
$keys
array
Exceptions
Returns
array
Associative array of keys and values
Test if an item exists.
hasItem(string $key) : bool
Parameters
$key
string
Exceptions
Returns
bool
Test multiple items.
hasItems(array $keys) : array
Parameters
$keys
array
Exceptions
Returns
array
Array of found keys
Increment an item.
incrementItem(string $key, int $value) : int | bool
Parameters
$key
string
$value
int
Exceptions
Returns
int
bool
The new value on success, false on failure
Increment multiple items.
incrementItems(array $keyValuePairs) : array
Parameters
$keyValuePairs
array
Exceptions
Returns
array
Associative array of keys and new values
Remove an item.
removeItem(string $key) : bool
Parameters
$key
string
Exceptions
Returns
bool
Remove multiple items.
removeItems(array $keys) : array
Parameters
$keys
array
Exceptions
Returns
array
Array of not removed keys
Replace an existing item.
replaceItem(string $key, mixed $value) : bool
Parameters
$key
string
$value
mixed
Exceptions
Returns
bool
Replace multiple existing items.
replaceItems(array $keyValuePairs) : array
Parameters
$keyValuePairs
array
Exceptions
Returns
array
Array of not stored keys
Store an item.
setItem(string $key, mixed $value) : bool
Parameters
$key
string
$value
mixed
Exceptions
Returns
bool
Store multiple items.
setItems(array $keyValuePairs) : array
Parameters
$keyValuePairs
array
Exceptions
Returns
array
Array of not stored keys
Reset lifetime of an item
touchItem(string $key) : bool
Parameters
$key
string
Exceptions
Returns
bool
Reset lifetime of multiple items.
touchItems(array $keys) : array
Parameters
$keys
array
Exceptions
Returns
array
Array of not updated keys