Extends
lithium\core\Object
Performs an increment operation on specified numeric cache item.
Parameters
- string $key Key of numeric cache item to increment.
- integer $offset Offset to increment - defaults to 1.
Returns
closure Function returning item's new value on successful increment, `false` otherwise.Source
public function increment($key, $offset = 1) {
$cache =& $this->_cache;
return function($self, $params) use (&$cache, $offset) {
extract($params);
return $cache[$key] += 1;
};
}