CI_Cache::increment()

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

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

New value on success, FALSE on failure

Return type:

mixed

Performs atomic incrementation of a raw stored value.

// 'iterator' has a value of 2

$this->cache->increment('iterator'); // 'iterator' is now 3

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

Please login to continue.