Support passing LocalSite.ANY to Profile starred cache count functions.
Review Request #12329 — Created June 2, 2022 and submitted — Latest diff uploaded
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.
Diff Revision 1
This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.
orig
1
2
Commits
reviewboard/accounts/models.py |
---|
reviewboard/accounts/tests/test_profile.py |
---|