lithium\storage\cache\adapter\Memcache::decrement()
Implements
lithium\storage\cache\Adapter::decrement()
Performs an atomic decrement operation on specified numeric cache item.
Note that, as per the Memcached specification: "If the item's value is not numeric, it is treated as if the value were 0. If the operation would decrease the value below 0, the new value will be 0."
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
.
Links
Source
public function decrement($key, $offset = 1) {
return $this->connection->decrement($key, $offset);
}