[wp-trac] [WordPress Trac] #34359: Cache output of `wp_upload_dir()` to improve performance
WordPress Trac
noreply at wordpress.org
Thu Oct 22 21:32:31 UTC 2015
#34359: Cache output of `wp_upload_dir()` to improve performance
--------------------------+-------------------------------------
Reporter: DH-Shredder | Owner: DH-Shredder
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.4
Component: Media | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: multisite, performance
--------------------------+-------------------------------------
Comment (by azaozz):
Looks like `wp_upload_dir()` is intended to be called (mostly) in wp-
admin, when saving or deleting an uploaded file, etc. It would be nice to
cache all of it but that may prove difficult or bring edge cases.
As far as I see responsive images only need `$uploads_dir['baseurl']`.
Maybe only this can be cached for now, so there is only one call to
`wp_upload_dir()` per front-end page load.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34359#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list