Opened 10 years ago
Closed 10 years ago
#6100 closed defect (bug) (fixed)
Incorrect XProfile data cache group
Reported by: | johnjamesjacoby | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.2 | Priority: | normal |
Severity: | normal | Version: | 2.0 |
Component: | Extended Profile | Keywords: | has-patch |
Cc: |
Description
In the XProfile component, field data is currently grouped by user ID like: bp_xprofile_data_1
This has the unintended consequence of XProfile field data cannot be fully purged for all users without first analyzing which groups exist and unsetting them. This isn't necessarily wrong (because we are free to key and group things however we see fit) but it is the only cache group in all of WordPress & BuddyPress that currently works like this, and we may need to use dynamic cache groups in a more creative way in the future.
In 6100.patch I'm switching the cache group over to
bp_xprofile_data
and setting it as a global group, then keying by$user_id:$field_id
instead of just$field_id
. I'm also taking advantage ofBP_Component
enhancements introduced in #5733. Patch also includes updated unit tests, props r-a-y.