WordPress at a glance

wp_cache_incr() WP 1.0

Increment numeric cache item's value

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

No Hooks.


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


wp_cache_incr( $key, $offset, $group );
$key(int/string) (required)
The key for the cache contents that should be incremented.
The amount by which to increment the item's value.
Default: 1
The group the key is in.
Default: ''

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

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

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

Related Functions

From tag: cache (caching)

No comments
    Hello, !     Log In . Register