wp_cache_incr

函数


wp_cache_incr ( $key, $offset = 1, $group = '' )
参数
  • (int|string)
    $key
    The key for the cache contents that should be incremented.
    Required:
  • (int)
    $offset
    Optional. The amount by which to increment the item’s value. Default 1.
    Required:
    Default: 1
  • (string)
    $group
    Optional. The group the key is in. Default empty.
    Required:
    Default: (empty)
返回值
  • (int|false) The item’s new value on success, false on failure.
相关
  • WP_Object_Cache::incr()
定义位置
  • wp-includes/cache.php
    , line 229
引入
3.3.0
弃用

Increments numeric cache item’s value.

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

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