Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/08/2018 03:20:59 PM (7 years ago)
Author:
boonebgorges
Message:

Notifications: User count query should be separately fetched and cached.

Previously, notification counts were calculated by fetching the entire
notification objects.

Props m_uysl.
See #7130.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/notifications/functions.php

    r11737 r11851  
    3636
    3737        $this->assertFalse( wp_cache_get( 'all_for_user_' . $u, 'bp_notifications' ) );
     38        $this->assertFalse( wp_cache_get( $u, 'bp_notifications_unread_count' ) );
    3839    }
    3940
     
    6263
    6364        $this->assertFalse( wp_cache_get( 'all_for_user_' . $u, 'bp_notifications' ) );
     65        $this->assertFalse( wp_cache_get( $u, 'bp_notifications_unread_count' ) );
    6466    }
    6567
     
    9294
    9395        $this->assertFalse( wp_cache_get( 'all_for_user_' . $u, 'bp_notifications' ) );
     96        $this->assertFalse( wp_cache_get( $u, 'bp_notifications_unread_count' ) );
    9497    }
    9598
     
    122125
    123126        $this->assertFalse( wp_cache_get( 'all_for_user_' . $u, 'bp_notifications' ) );
     127        $this->assertFalse( wp_cache_get( $u, 'bp_notifications_unread_count' ) );
    124128    }
    125129
Note: See TracChangeset for help on using the changeset viewer.