lithium\storage\cache\adapter\Memory::decrement()
Implements
lithium\storage\cache\Adapter::decrement()
Performs a decrement operation on specified numeric cache item.
Parameters
-
string
$key
Key of numeric cache item to decrement.
-
integer
$offset
Offset to decrement - defaults to
1
.
Returns
integer|booleanThe item's new value on successful decrement, else false
.
Source
public function decrement($key, $offset = 1) {
if (!array_key_exists($key, $this->_cache)) {
return false;
}
return $this->_cache[$key] -= $offset;
}