Changeset 7997 for trunk/bp-activity/bp-activity-classes.php
- Timestamp:
- 02/27/2014 07:48:22 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-classes.php
r7959 r7997 138 138 global $wpdb, $bp; 139 139 140 $row = wp_cache_get( 'activity_' . $this->id, 'bp' );140 $row = wp_cache_get( $this->id, 'bp_activity' ); 141 141 142 142 if ( false === $row ) { 143 143 $row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE id = %d", $this->id ) ); 144 145 wp_cache_set( $this->id, $row, 'bp_activity' ); 144 146 } 145 147 … … 475 477 476 478 // If cached data is found, use it 477 if ( $activity_data = wp_cache_get( 'activity_' . $activity_id, 'bp' ) ) {479 if ( $activity_data = wp_cache_get( $activity_id, 'bp_activity' ) ) { 478 480 $activities[ $activity_id ] = $activity_data; 479 481 … … 499 501 foreach ( (array) $queried_adata as $adata ) { 500 502 $activities[ $adata->id ] = $adata; 501 wp_cache_set( 'activity_' . $adata->id, $adata, 'bp' );503 wp_cache_set( $adata->id, $adata, 'bp_activity' ); 502 504 } 503 505 }
Note: See TracChangeset
for help on using the changeset viewer.