#2312 closed defect (bug) (fixed)
bbp_clean_post_cache() uses wrong cache group
| Reported by: | wpdennis | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.3.1 |
| Component: | API - Cache | Version: | 2.3 |
| Severity: | critical | Keywords: | dev-feedback has-patch needs-testing |
| Cc: |
Description
bbp_clean_post_cache() uses the "old" cache group. The group name has changed in 2.3 (4848).
I checked the code for these groups and, as far as I can tell, it should look like this (last parameter of each wp_cache_delete()):
foreach ( $post_types as $post_type ) {
wp_cache_delete( 'bbp_get_forum_' . $_post->ID . '_reply_id', 'bbpress_posts' );
wp_cache_delete( 'bbp_parent_' . $_post->ID . '_type_' . $post_type . '_child_last_id', 'bbpress_posts' );
wp_cache_delete( 'bbp_parent_' . $_post->ID . '_type_' . $post_type . '_child_count', 'bbpress_posts' );
wp_cache_delete( 'bbp_parent_public_' . $_post->ID . '_type_' . $post_type . '_child_ids', 'bbpress_posts' );
wp_cache_delete( 'bbp_parent_all_' . $_post->ID . '_type_' . $post_type . '_child_ids', 'bbpress_posts' );
}
Change History (5)
#2
follow-up:
↓ 5
@
13 years ago
I patched it in a productive environment right now. It solved an error, where the post meta _bbp_reply_count wasn't updated in bbp_update_topic_reply_count().
I'll report back, if I find any troubles because of these changes.
#5
in reply to: ↑ 2
@
13 years ago
Replying to wpdennis:
I patched it in a productive environment right now. It solved an error, where the post meta _bbp_reply_count wasn't updated in bbp_update_topic_reply_count().
I'll report back, if I find any troubles because of these changes.
Thanks. Confirmed fixed here also. Feel free to reopen if there are any adverse effects.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Good catch. Moving to 2.3.1.