On this page
wp_cache_decr( int|string $key, int $offset = 1, string $group = '' ): int|false
Decrements numeric cache item’s value.
Description
See also
Parameters
$keyint|string Required-
The cache key to decrement.
$offsetint Optional-
The amount by which to decrement the item's value.
Default:
1 $groupstring Optional-
The group the key is in.
Default:
''
Return
int|false The item's new value on success, false on failure.
Source
File: wp-includes/cache.php. View all references
function wp_cache_decr( $key, $offset = 1, $group = '' ) {
global $wp_object_cache;
return $wp_object_cache->decr( $key, $offset, $group );
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Object_Cache::decr() wp-includes/class-wp-object-cache.php | Decrements numeric cache item’s value. |
Changelog
| Version | Description |
|---|---|
| 3.3.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_cache_decr