[wp-trac] [WordPress Trac] #36621: Don't cache the results of wp_mkdir_p() in a persistent cache

WordPress Trac noreply at wordpress.org
Thu Apr 21 19:57:06 UTC 2016


#36621: Don't cache the results of wp_mkdir_p() in a persistent cache
------------------------------+----------------------
 Reporter:  barry             |       Owner:  ocean90
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  4.5.1
Component:  Media             |     Version:  4.5
 Severity:  major             |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:
------------------------------+----------------------
Changes (by ocean90):

 * owner:   => ocean90
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"37285"]:
 {{{
 #!CommitTicketReference repository="" revision="37285"
 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.

 Props azaozz, ocean90.
 See #34359.
 Fixes #36621.
 }}}

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


More information about the wp-trac mailing list