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_cache_decrwp_cache_initwp_cache_resetwp_cache_closewp_cache_add
引入
3.3.0
棄用
-

wp_cache_incr: 這個函式將快取中指定的鍵的值增加一個指定的數量。

增加數字快取項的值。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_cache_incr( $key, $offset = 1, $group = '' ) {
global $wp_object_cache;
return $wp_object_cache->incr( $key, $offset, $group );
}
function wp_cache_incr( $key, $offset = 1, $group = '' ) { global $wp_object_cache; return $wp_object_cache->incr( $key, $offset, $group ); }
function wp_cache_incr( $key, $offset = 1, $group = '' ) {
	global $wp_object_cache;

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

常見問題

FAQs
檢視更多 >