WordPress at a glance

wp_cache_decr() WP 1.0

Decrements numeric cache item's value.

  • See: WP_Object_Cache::decr()
  • Global. WP_Object_Cache. $wp_object_cache Object cache global instance.
Works based on: WP_Object_Cache::decr()

No Hooks.

Return

false/Int. False on failure, the item's new value on success.

Usage

wp_cache_decr( $key, $offset, $group );
$key(int/string) (required)
The cache key to decrement.
$offset(int)
The amount by which to decrement the item's value.
Default: 1
$group(string)
The group the key is in.
Default: ''

Code of wp cache decr: wp-includes/cache.php WP 5.2.2

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

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

Related Functions

From tag: cache (caching)

No comments
    Hello, !     Log In . Register