Opened 7 years ago
Closed 7 years ago
#41762 closed enhancement (fixed)
Use WP_Network_Query in ms_load_current_site_and_network
Reported by: | spacedmonkey | Owned by: | flixos90 |
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | Networks and Sites | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description (last modified by )
Use WP_Network_Query in ms_load_current_site_and_network instead of raw SQL query.
Attachments (2)
Change History (11)
#1
@
7 years ago
- Description modified (diff)
- Summary changed from Use get_networks in ms_load_current_site_and_network to Use WP_Network_Query in ms_load_current_site_and_network
This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.
7 years ago
This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.
7 years ago
This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.
7 years ago
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
7 years ago
#7
@
7 years ago
- Milestone changed from Awaiting Review to 4.9
- Owner set to flixos90
- Status changed from new to reviewing
Let's keep the current-network
cache in place for now, as it's less aggressively invalidated compared to the cache used by WP_Network_Query
.
#8
@
7 years ago
41762.2.diff keeps the current-network
cache key in place, and removes the now unused $wpdb
global.
Note: See
TracTickets for help on using
tickets.
Replace raw sql to the sites table with wp_network_query. Number of briefs to this, wp_network_query has filters that are run. Also network queries also have caching out of the box.