Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/18/2015 04:39:54 AM (9 years ago)
Author:
netweb
Message:

Performance: Replace direct SQL queries with WP_Query() objects in the following functions:

  • bbp_update_forum_topic_count()
  • bbp_update_forum_topic_count_hidden()
  • bbp_update_forum_reply_count()
  • bbp_get_public_child_last_id()
  • bbp_get_public_child_count()
  • bbp_get_public_child_ids()

Props johnjamesjacoby.
See #1799.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/cache.php

    r5951 r5954  
    164164    // Loop through query types and clean caches
    165165    foreach ( $post_types as $post_type ) {
    166         wp_cache_delete( 'bbp_get_forum_'     . $_post->ID . '_reply_id',                              'bbpress_posts' );
    167         wp_cache_delete( 'bbp_parent_'        . $_post->ID . '_type_' . $post_type . '_child_last_id', 'bbpress_posts' );
    168         wp_cache_delete( 'bbp_parent_'        . $_post->ID . '_type_' . $post_type . '_child_count',   'bbpress_posts' );
    169         wp_cache_delete( 'bbp_parent_public_' . $_post->ID . '_type_' . $post_type . '_child_ids',     'bbpress_posts' );
    170166        wp_cache_delete( 'bbp_parent_all_'    . $_post->ID . '_type_' . $post_type . '_child_ids',     'bbpress_posts' );
    171167    }
Note: See TracChangeset for help on using the changeset viewer.