boonebgorges / bp-groupblog

BuddyPress Groupblog
GNU General Public License v3.0
15 stars 10 forks source link

Refactor get_groupblog_group_id() to use a group meta query #56

Closed r-a-y closed 1 year ago

r-a-y commented 1 year ago

This is a continuation of #55. The 'bp_groupblog_blog_group_ids' cachegroup currently isn't global, so the cache will always be different if get_groupblog_group_id() is called from the root blog vs. the groupblog.

I was thinking about registering the 'bp_groupblog_blog_group_ids' cachegroup globally, but decided that a group meta query is cleaner due to BP doing a better job of caching group queries after BP Groupblog rolled its own custom caching.

boonebgorges commented 1 year ago

Good call - I agree that this approach is cleaner and that the cache in BP is probably fine.