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

WordPress Trac noreply at wordpress.org
Thu Feb 18 18:23:04 UTC 2016


#34359: Cache output of `wp_upload_dir()` to improve performance
-------------------------------------------+-------------------------------
 Reporter:  mikeschroder                   |       Owner:  azaozz
     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 azaozz):

 Found another edge case: if wp-content is temporarily unavailable (perhaps
 on very slow NFS share, etc.) we cache the wp_mkdir_p() error in
 persistent cache. Then we return that error until the cache expires.

 These errors are very rare. Thinking it is better if we don't cache
 wp_mkdir_p()/file system errors so if there is some sort of temporary
 outage we don't block uploads needlessly.

 In 34359.6.patch: change the persistent caching of tested paths to only
 cache them when no FS errors.

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


More information about the wp-trac mailing list