[wp-trac] [WordPress Trac] #34359: Cache output of `wp_upload_dir()` to improve performance
WordPress Trac
noreply at wordpress.org
Thu Apr 21 20:17:36 UTC 2016
#34359: Cache output of `wp_upload_dir()` to improve performance
-------------------------------------------+-------------------------------
Reporter: mikeschroder | Owner: azaozz
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.5
Component: Media | Version:
Severity: normal | Resolution: fixed
Keywords: needs-testing has-patch early | Focuses: multisite,
| performance
-------------------------------------------+-------------------------------
Comment (by ocean90):
In [changeset:"37286"]:
{{{
#!CommitTicketReference repository="" revision="37286"
Media: Don't cache the results of `wp_mkdir_p()` in a persistent cache.
To improve the performance of `wp_upload_dir()` the result of
`wp_mkdir_p()` was stored in a persistent cache, introduced in [36565].
But this becomes an issue when WordPress is scaled horizontally. You may
end up caching a value for a server where the directory doesn't exist
which will prevent further uploads on other servers because of the
persistent cache.
The fix is to use a non-persistent cache.
Merge of [37285] to the 4.5 branch.
Props azaozz, ocean90.
See #34359.
Fixes #36621.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34359#comment:64>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list