lithium\storage\cache\adapter\Memory::increment PHP Method

increment() public method

Performs an increment operation on specified numeric cache item.
public increment ( string $key, integer $offset = 1 ) : integer | boolean
$key string Key of numeric cache item to increment.
$offset integer Offset to increment - defaults to `1`.
return integer | boolean The item's new value on successful increment, else `false`.
    public function increment($key, $offset = 1)
    {
        if (!array_key_exists($key, $this->_cache)) {
            return false;
        }
        return $this->_cache[$key] += $offset;
    }