Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/19/2009 01:35:32 PM (16 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-activity/bp-activity-widgets.php

    r1052 r1238  
    2828    }
    2929    ?>
     30   
     31    <?php
     32    if ( !$activity = wp_cache_get( 'sitewide_activity', 'bp' ) ) {
     33        $activity = bp_activity_get_sitewide_activity( $options['max_items'] );
     34        wp_cache_set( 'sitewide_activity', $activity, 'bp' );
     35    }
     36    ?>
    3037
    31     <?php $activity = bp_activity_get_sitewide_activity( $options['max_items'] ) ?>
     38    <?php ?>
    3239   
    3340    <?php if ( $activity ) : ?>
Note: See TracChangeset for help on using the changeset viewer.