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-wire/bp-wire-classes.php

    r1052 r1238  
    9595            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    9696       
    97         $wire_posts = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$table_name} WHERE item_id = %d  ORDER BY date_posted DESC $pag_sql", $item_id ) );
     97        $wire_posts = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$table_name} WHERE item_id = %d ORDER BY date_posted DESC $pag_sql", $item_id ) );
    9898        $count = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM {$table_name} WHERE item_id = %d", $item_id ) );
    9999       
Note: See TracChangeset for help on using the changeset viewer.