bp_messages_update_meta_cache( int|string|array|bool $message_ids = false )

Slurp up metadata for a set of messages.

Description Description

It grabs all message meta associated with all of the messages passed in $message_ids and adds it to WP cache. This improves efficiency when using message meta within a loop context.

Top ↑

Parameters Parameters


(int|string|array|bool) (Optional) Accepts a single message_id, or a comma-separated list or array of message ids.

Default value: false

Source Source

File: bp-messages/bp-messages-cache.php

function bp_messages_update_meta_cache( $message_ids = false ) {
	bp_update_meta_cache( array(
		'object_ids' 	   => $message_ids,
		'object_type' 	   => buddypress()->messages->id,
		'cache_group'      => 'message_meta',
		'object_column'    => 'message_id',
		'meta_table' 	   => buddypress()->messages->table_name_meta,
		'cache_key_prefix' => 'bp_messages_meta'
	) );

Top ↑

Changelog Changelog

Version Description
2.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.