wp_cache_incr( int|string $key, int $offset = 1, string $group = '' ): int|false
- Since
- 3.3.0
- Source
wp-includes/cache.php:229
Increments numeric cache item's value.
Parameters
$keyint|string- The key for the cache contents that should be incremented.
$offsetintoptional- The amount by which to increment the item's value. Default 1.Default:
1 $groupstringoptional- The group the key is in. Default empty.Default:
''
Return
int|false- The item's new value on success, false on failure.
Source
function wp_cache_incr( $key, $offset = 1, $group = '' ) { global $wp_object_cache; return $wp_object_cache->incr( $key, $offset, $group );}History
Introduced in 3.3.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 tag, from
src/wp-includes/cache.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.