PROD-10321 - #5032
Conversation
…s against live avatar and cover state The staleness check in bp_xprofile_get_selected_options_user_progress() compared bb_validate_gravatar() — always false, since its transient is never set on this path — against the stored is_uploaded flag. Every member with an uploaded avatar mismatched permanently and paid a full meter recalculation on every widget render, while a stale 0 (avatar detection unavailable while an offload/CDN plugin was inactive) never recalculated at all. Compare the cached is_uploaded flags against live avatar and cover state instead, recalculating only on genuine drift. Gravatar disambiguation is kept for the stored=1/no-uploaded-avatar subset so gravatar users behave as before; the outbound gravatar probe stays confined to the recalculation itself. Ship together with buddyboss-offload-media (detection filter + purge migration, 0f0d1eab) — its bp_get_user_has_avatar filter is how offloaded avatars register as live state here.
…s against live avatar and cover state The staleness check in bp_xprofile_get_selected_options_user_progress() compared bb_validate_gravatar() — always false, since its transient is never set on this path — against the stored is_uploaded flag. Every member with an uploaded avatar mismatched permanently and paid a full meter recalculation on every widget render, while a stale 0 (avatar detection unavailable while an offload/CDN plugin was inactive) never recalculated at all. Compare the cached is_uploaded flags against live avatar and cover state instead, recalculating only on genuine drift. Gravatar handling honors the recalculation's own counting gate (profile gravatars enabled, non-blank default) and detects newly-countable gravatars from the cached probe headers only when they carry the markers the recalculation itself requires (200 + Link), so both directions of a gravatar setting toggle heal in one view without recalculation loops. The outbound gravatar probe stays confined to the recalculation. Ship together with buddyboss-offload-media (detection filter + purge migration) — its bp_get_user_has_avatar filter is how offloaded avatars register as live state here.
|
@claude |
|
Claude finished @jitendrabanjara1991's task in 2m 26s —— View job Claude finished reviewing this PR (from scratch)Todo list
Note: I was not able to run Summary
This replaces a broken staleness check ( I traced every function/cache-key this touches against its real implementation:
So the core logic is sound and each "cheap check only" claim in the docblock/comment is actually true against the current codebase — this isn't just narrative. Minor observations (non-blocking)
VerdictNo correctness, security, or regression issues found. The new logic is more conservative than the old broken check in every direction (falls back to "not stale" / defers to the next natural recalculation trigger rather than guessing), and each cache-format/gate assumption checks out against the actual implementations in this codebase. |
Jira Issue:
https://buddyboss.atlassian.net/browse/PROD-9951
https://buddyboss.atlassian.net/browse/PROD-10321
General Note
Keep all conversations related to this PR in the associated Jira issue(s). Do NOT add comment on this PR or edit this PR’s description.
Notes to Developer
Notes to Reviewer