wp_cache_incr( int|string $key, int $offset = 1, string $group = '' )

Increment numeric cache item’s value

Description Description

See also See also

Top ↑

Parameters Parameters


(int|string) (Required) The key for the cache contents that should be incremented.


(int) (Optional) The amount by which to increment the item's value.

Default value: 1


(string) (Optional) The group the key is in.

Default value: ''

Top ↑

Return Return

(false|int) False on failure, the item's new value on success.

Top ↑

Source Source

File: wp-includes/cache.php

function wp_cache_incr( $key, $offset = 1, $group = '' ) {
	global $wp_object_cache;

	return $wp_object_cache->incr( $key, $offset, $group );

Top ↑

Changelog Changelog

Version Description
3.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.