[wp-trac] [WordPress Trac] #22190: Delete oEmbed caches on pre_post_update so cached meta is used
WordPress Trac
wp-trac at lists.automattic.com
Mon Oct 15 03:06:44 UTC 2012
#22190: Delete oEmbed caches on pre_post_update so cached meta is used
-----------------------+--------------------------
Reporter: nacin | Type: defect (bug)
Status: new | Priority: normal
Milestone: 3.5 | Component: Performance
Version: | Severity: normal
Keywords: has-patch |
-----------------------+--------------------------
WP_Embed::delete_oembed_caches() is hooked into 'save_post', after which
it calls get_post_meta() in a roundabout way. This results in an automatic
update_meta_cache() call for a saved post, when it may not be otherwise
needed for the rest of that pageload.
By moving oEmbed deletion to pre_post_update, we're able to use metadata
that is more likely to already be in cache. If it is not already in cache
but we do need metadata after, this could potentially add a query. But, I
think the tradeoff is worth it.
Parent ticket: #22189. Saving navigation menus are slow.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22190>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list