lithium\storage\cache\adapter\Apc::decrement()

public method

Performs an atomic decrement operation on specified numeric cache item.

Note that, as per the APC specification: If the item's value is not numeric, the decrement operation has no effect on the key - it retains its original non-integer value.

Parameters

  • string $key

    Key of numeric cache item to decrement.

  • integer $offset

    Offset to decrement - defaults to 1.

Returns

integer|boolean

The item's new value on successful decrement, else false.

Source

	public function decrement($key, $offset = 1) {
		return apcu_dec(
			$this->_config['scope'] ? "{$this->_config['scope']}:{$key}" : $key, $offset
		);
	}