wp_cache_add_multiple

函数
wp_cache_add_multiple ( $data, $group = '', $expire = 0 )
参数
  • (array) $data Array of keys and values to be set.
    Required:
  • (string) $group Optional. Where the cache contents are grouped. Default empty.
    Required:
    Default: (empty)
  • (int) $expire Optional. When to expire the cache contents, in seconds. Default 0 (no expiration).
    Required:
返回值
  • (bool[]) Array of return values, grouped by key. Each value is either true on success, or false if cache key and group already exist.
相关
  • WP_Object_Cache::add_multiple()
定义位置
相关方法
wp_cache_set_multiplewp_cache_get_multiplewp_cache_delete_multiplewp_cache_addwp_cache_delete
引入
6.0.0
弃用
-

wp_cache_add_multiple: 这个函数使用一个值和键的数组,一次添加多个键值对到缓存中。键和值应该在数组中按顺序排列。

在一次调用中向缓存添加多个值。

function wp_cache_add_multiple( array $data, $group = '', $expire = 0 ) {
	global $wp_object_cache;

	return $wp_object_cache->add_multiple( $data, $group, $expire );
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 21:33:01

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: