Changeset 7051 for trunk/bp-activity/bp-activity-cache.php
- Timestamp:
- 05/09/2013 02:26:50 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-cache.php
r6342 r7051 33 33 'cache_key_prefix' => 'bp_activity_meta' 34 34 ); 35 35 36 36 bp_update_meta_cache( $cache_args ); 37 37 } 38 39 /** 40 * Clear the cache for all metadata of a given activity 41 * 42 * @param int $activity_id 43 */ 44 function bp_activity_clear_meta_cache_for_activity( $activity_id ) { 45 global $wp_object_cache; 46 47 if ( is_object( $wp_object_cache ) && ! empty( $wp_object_cache->cache['bp'] ) ) { 48 foreach ( $wp_object_cache->cache['bp'] as $ckey => $cvalue ) { 49 if ( 0 === strpos( $ckey, 'bp_activity_meta_' . $activity_id ) ) { 50 wp_cache_delete( $ckey, 'bp' ); 51 } 52 } 53 } 54 }
Note: See TracChangeset
for help on using the changeset viewer.