[wp-trac] [WordPress Trac] #40490: Prime post cache in `wp_make_content_images_responsive()`

WordPress Trac noreply at wordpress.org
Fri Aug 25 16:15:29 UTC 2017


#40490: Prime post cache in `wp_make_content_images_responsive()`
-------------------------+------------------------
 Reporter:  dlh          |       Owner:  joemcgill
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  4.9
Component:  Media        |     Version:  4.7
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |     Focuses:
-------------------------+------------------------
Changes (by joemcgill):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"41315"]:
 {{{
 #!CommitTicketReference repository="" revision="41315"
 Media: Prime post caches in 'wp_make_content_images_responsive()'.

 In [38296] we replaced `get_post_meta()` with
 `wp_get_attachment_metadata()`
 so that attachment metadata could be consistently filtered. However, this
 results in extra post queries which were previously avoided.

 This uses `_prime_post_caches()` instead of `update_meta_cache()` to
 improve
 post caching before looping through all images to retrieve attachment
 metadata.

 Props dlh.
 Fixes #40490.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40490#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list