wp_cache_incr

Advertisement

Summery Summery

Increment numeric cache item’s value

Syntax Syntax

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

Parameters Parameters

$key

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

$offset

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

Default value: 1

$group

(Optional) The group the key is in.

Default value: ''

Return Return

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

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 );
}

Advertisement

Changelog Changelog

Changelog
Version Description
3.3.0 Introduced.

See also See also

Advertisement

Leave a Reply