[wp-trac] [WordPress Trac] #34359: Cache output of `wp_upload_dir()` to improve performance
WordPress Trac
noreply at wordpress.org
Fri Oct 30 20:28:36 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 DH-Shredder):
Replying to [comment:6 azaozz]:
> 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.
If we can avoid the call completely, that's likely fine for responsive
images.
If it's going to be cached for responsive images, though, I'd definitely
prefer to see it in `wp_upload_dir()`, so it improves performance beyond
just responsive image support.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34359#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list