[buddypress-trac] [BuddyPress Trac] #6045: $bp->site_options should not be referenced directly

buddypress-trac noreply at wordpress.org
Wed Dec 10 20:21:08 UTC 2014


#6045: $bp->site_options should not be referenced directly
--------------------------+------------------
 Reporter:  boonebgorges  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  2.2
Component:  Core          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by boonebgorges):

 > Note that only the first call to get_site_option() for each option

 Yes, *for each option*. We currently fetch all of these with a single DB
 query. So if we pull up 5 options, that'll be 4 extra queries.

 This is different from the way `get_option()` works. That function loads
 *all* options (at least autoload=true options) into the cache on the first
 call.

 Anyway, we should test it. I'd be OK with adding a DB hit or two if it let
 us simplify all of this.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6045#comment:7>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list