[wp-trac] [WordPress Trac] #34359: Cache output of `wp_upload_dir()` to improve performance

WordPress Trac noreply at wordpress.org
Thu Feb 11 04:27:43 UTC 2016


#34359: Cache output of `wp_upload_dir()` to improve performance
-------------------------------------------+-------------------------------
 Reporter:  mikeschroder                   |       Owner:  mikeschroder
     Type:  defect (bug)                   |      Status:  assigned
 Priority:  normal                         |   Milestone:  4.5
Component:  Media                          |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  needs-testing has-patch early  |     Focuses:  multisite,
                                           |  performance
-------------------------------------------+-------------------------------

Comment (by boonebgorges):

 Replying to [comment:43 joemcgill]:
 > Replying to [comment:42 mikeschroder]:
 > > However, have this failing unit test:
 >
 > I believe this may a flaw in our unit tests for #15928 and #32112.
 Essentially, we're changing the scheme of the 'site_url' during the course
 of the tests in order to check the URL created by
 `wp_get_attachment_image()` in different contexts. However, caching the
 uploads directory is effectively negating those changes. We should
 probably rewrite those tests so we filter the output of `wp_uploads()`
 instead of changing the `site_url()` option during the same set of
 operations.

 Or we manually bust the cache in those tests.

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


More information about the wp-trac mailing list