bp_messages_delete_thread_paginated_messages_cache( $thread_id )
Invalidate cache for thread pagination messages.
Description
Source
File: bp-messages/bp-messages-cache.php
function bp_messages_delete_thread_paginated_messages_cache( $thread_id ) {
BP_Messages_Thread::$noCache = true;
$thread_id = $thread_id;
$before = null;
$perpage = 10;
while ( wp_cache_get( "{$thread_id}{$before}{$perpage}", 'bp_messages_threads' ) ) {
wp_cache_delete( "{$thread_id}{$before}{$perpage}", 'bp_messages_threads' );
$messages = BP_Messages_Thread::get_messages( $thread_id, $before, $perpage );
if ( end($messages) ) {
$before = end($messages)->date_sent;
}
}
BP_Messages_Thread::$noCache = false;
}
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.