wp_cache_decr( int|string $key, int $offset = 1, string $group =  ): int|false

Decrements numeric cache item’s value.

Description

See also

Parameters

$keyint|stringrequired
The cache key to decrement.
$offsetintoptional
The amount by which to decrement the item’s value.

Default:1

$groupstringoptional
The group the key is in.

Default:''

Return

int|false The item’s new value on success, false on failure.

Source

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

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

Changelog

VersionDescription
3.3.0Introduced.

User Contributed Notes

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