[buddypress-trac] [BuddyPress Trac] #7609: Add "IDs only" return format option for BP_Groups_Group::get().
buddypress-trac
noreply at wordpress.org
Tue Oct 17 14:01:32 UTC 2017
#7609: Add "IDs only" return format option for BP_Groups_Group::get().
-------------------------+-----------------------
Reporter: dcavins | Owner: dcavins
Type: enhancement | Status: accepted
Priority: normal | Milestone: 3.0
Component: Groups | Version: 2.9.0
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+-----------------------
Comment (by boonebgorges):
> That's a good point; I didn't call it fields because it seems that the
WP_Query fields parameter is more robust than what I was thinking of (but
it'd be better to plan ahead for future robustness, and we can add other
options later).
IMO the main reason for going with `fields=ids` is standardization. It
makes the API much more predictable, especially for folks with less BP
experience.
> Do you have an opinion about whether passing 'fields' => 'ids should
also prevent the cache prefetch queries? Or should those be independent?
Again, looking at WP: object caches are *not* primed when `fields=ids`.
This makes sense because people calling `fields=ids` know that they don't
need the object data, and are looking to increase performance. So I'd say
that we should follow this example and skip the cache priming.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7609#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list