• 
      

    Support passing LocalSite.ANY to Profile starred cache count functions.

    Review Request #12329 — Created June 2, 2022 and submitted

    Information

    Review Board
    release-5.0.x

    Reviewers

    This updates the following methods on Profile to accept
    local_site=LocalSite.ALL:

    • get_starred_review_groups_count()
    • get_starred_review_requests_count()
    • has_starred_review_groups()
    • has_starred_review_requests()

    This can be used to make determinations as to whether a user has starred
    items at all, regardless of global/local site.

    When invalidating cached data, both the site (global or local) and the
    ALL keys are invalidated, ensuring both are updated for the
    appropriate totals.

    Unit tests pass.

    Summary ID
    Support passing LocalSite.ANY to Profile starred cache count functions.
    This updates the following methods on `Profile` to accept `local_site=LocalSite.ALL`: * `get_starred_review_groups_count()` * `get_starred_review_requests_count()` * `has_starred_review_groups()` * `has_starred_review_requests()` This can be used to make determinations as to whether a user has starred items at all, regardless of global/local site. When invalidating cached data, both the site (global or local) and the `ALL` keys are invalidated, ensuring both are updated for the appropriate totals.
    70b08be4c540076f955791ea975dd27f43c421f6
    Description From Last Updated

    F841 local variable 'key' is assigned to but never used

    reviewbotreviewbot

    F841 local variable 'local_site' is assigned to but never used

    reviewbotreviewbot

    F841 local variable 'local_site' is assigned to but never used

    reviewbotreviewbot

    F841 local variable 'local_site' is assigned to but never used

    reviewbotreviewbot

    F841 local variable 'local_site' is assigned to but never used

    reviewbotreviewbot
    Checks run (1 failed, 1 succeeded)
    flake8 failed.
    JSHint passed.

    flake8

    chipx86
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-5.0.x (a2f7005)