Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/19/2009 01:35:32 PM (17 years ago)
Author:
apeatling
Message:

Added basic object caching support ready for the first release. This will cut the number of database calls and load by 3x. Add define( 'WP_CACHE', true ); to you wp-config.php and drop object-cache.php into /wp-content/ to enable.

A good file based object cache is available here:
http://neosmart.net/dl.php?id=14

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs/bp-blogs-classes.php

    r1052 r1238  
    365365            $total_post_count = $wpdb->get_var( $wpdb->prepare( "SELECT count(p.post_id) FROM {$bp->blogs->table_name_blog_posts} p LEFT JOIN {$wpdb->base_prefix}blogs b ON p.blog_id = b.blog_id WHERE b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND p.user_id = %d", $user_id) );           
    366366        }
    367            
    368            
     367
    369368        for ( $i = 0; $i < count($post_ids); $i++ ) {
    370369            $posts[$i] = BP_Blogs_Post::fetch_post_content($post_ids[$i]);
Note: See TracChangeset for help on using the changeset viewer.