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: 这个函数从缓存中检索多个值,使用一个键的数组。

在一次调用中从缓存中检索多个值。

function wp_cache_get_multiple( $keys, $group = '', $force = false ) {
	global $wp_object_cache;

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

常见问题

FAQs
查看更多 >