wp_cache_get_multiple

函式
wp_cache_get_multiple ( $keys, $group = '', $force = false )
引數
  • (array) $keys Array of keys under which the cache contents are stored.
    Required:
  • (string) $group Optional. Where the cache contents are grouped. Default empty.
    Required:
    Default: (empty)
  • (bool) $force Optional. Whether to force an update of the local cache from the persistent cache. Default false.
    Required:
    Default: false
返回值
  • (array) Array of return values, grouped by key. Each value is either the cache contents on success, or false on failure.
相關
  • WP_Object_Cache::get_multiple()
定義位置
相關方法
wp_cache_set_multiplewp_cache_delete_multiplewp_cache_add_multiplewp_cache_getwp_cache_get_last_changed
引入
5.5.0
棄用
-

wp_cache_get_multiple: 這個函式從快取中檢索多個值,使用一個鍵的陣列。

在一次呼叫中從快取中檢索多個值。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_cache_get_multiple( $keys, $group = '', $force = false ) {
global $wp_object_cache;
return $wp_object_cache->get_multiple( $keys, $group, $force );
}
function wp_cache_get_multiple( $keys, $group = '', $force = false ) { global $wp_object_cache; return $wp_object_cache->get_multiple( $keys, $group, $force ); }
function wp_cache_get_multiple( $keys, $group = '', $force = false ) {
	global $wp_object_cache;

	return $wp_object_cache->get_multiple( $keys, $group, $force );
}

常見問題

FAQs
檢視更多 >