Performs an atomic decrement operation on specified numeric cache item.
Note that, as per the XCache specification: If the item's value is not numeric, it is treated as if the value were 0. It is possible to decrement a value into the negative integers.

Parameters

  • string $key Key of numeric cache item to decrement
  • integer $offset Offset to decrement - defaults to 1.

Returns

closure Function returning item's new value on successful decrement, else `false`

Source

						public function decrement($key, $offset = 1) {
		return function($self, $params) use ($offset) {
			return xcache_dec($params['key'], $offset);
		};
	}