Skip to:
Content

BuddyPress.org

Changeset 8005


Ignore:
Timestamp:
02/28/2014 01:49:15 PM (10 years ago)
Author:
boonebgorges
Message:

Normalize the cache keys and group name used for activity comments

wp_cache_get( $aid, 'bp_activity_comments' )

is more in line with single item caching across other components.

See r7956, r7997

See #5434

Location:
trunk/bp-activity
Files:
2 edited

Legend:

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

    r8003 r8005  
    895895        }
    896896
    897         $comments = wp_cache_get( 'bp_activity_comments_' . $activity_id, 'bp' );
     897        $comments = wp_cache_get( $activity_id, 'bp_activity_comments' );
    898898
    899899        // We store the string 'none' to cache the fact that the
     
    970970            }
    971971
    972             wp_cache_set( 'bp_activity_comments_' . $activity_id, $cache_value, 'bp' );
     972            wp_cache_set( $activity_id, $cache_value, 'bp_activity_comments' );
    973973        }
    974974
  • trunk/bp-activity/bp-activity-functions.php

    r8004 r8005  
    12441244    ) );
    12451245
    1246     // Clear the comment cache for this activity
    1247     wp_cache_delete( 'bp_activity_comments_' . $parent_id, 'bp' );
     1246    // Clear the comment and item cache for this activity
     1247    wp_cache_delete( $parent_id, 'bp_activity_comments' );
    12481248    wp_cache_delete( $parent_id, 'bp_activity' );
    12491249
     
    16631663
    16641664    // Clear the activity comment cache for this activity item
    1665     wp_cache_delete( 'bp_activity_comments_' . $activity->id, 'bp' );
     1665    wp_cache_delete( $activity->id, 'bp_activity_comments' );
    16661666
    16671667    // If Akismet is active, and this was a manual spam/ham request, stop Akismet checking the activity
     
    17031703
    17041704    // Clear the activity comment cache for this activity item
    1705     wp_cache_delete( 'bp_activity_comments_' . $activity->id, 'bp' );
     1705    wp_cache_delete( $activity->id, 'bp_activity_comments' );
    17061706
    17071707    // If Akismet is active, and this was a manual spam/ham request, stop Akismet checking the activity
Note: See TracChangeset for help on using the changeset viewer.