wp_cache_incr() - WordPress 函数参考中文文档

返回介绍

wp_cache_incr()

发布于 2017-09-11 字数1412 浏览 801 评论 0

wp_cache_incr( int|string $key,  int $offset = 1,  string $group = '' )

Increment numeric cache item’s value


描述


参数

$key

(int|string)
(Required)
The key for the cache contents that should be incremented.

$offset

(int)
(Optional)
The amount by which to increment the item’s value.

Default value: 1

$group

(string)
(Optional)
The group the key is in.

Default value: ”


返回值

(false|int) False on failure, the item’s new value on success.


源代码

File: wp-includes/cache.php

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

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

更新日志

Version 描述
3.3.0 Introduced.

相关函数

Uses

  • wp-includes/cache.php:
    WP_Object_Cache::incr()

User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!