CI_Cache::decrement()

decrement($id[, $offset = 1])

Parameters:
  • $id (string) – Cache ID
  • $offset (int) – Step/value to reduce by
Returns:

New value on success, FALSE on failure

Return type:

mixed

Performs atomic decrementation of a raw stored value.

// 'iterator' has a value of 6

$this->cache->decrement('iterator'); // 'iterator' is now 5

$this->cache->decrement('iterator', 2); // 'iterator' is now 3
doc_CodeIgniter
2016-10-15 16:30:55
Comments
Leave a Comment

Please login to continue.