#36621 closed defect (bug) (fixed)
Don't cache the results of wp_mkdir_p() in a persistent cache
| Reported by: | barry | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.5.1 |
| Component: | Media | Version: | 4.5 |
| Severity: | major | Keywords: | has-patch commit fixed-major |
| Cc: | Focuses: |
Description
Follow-up to #34359.
This broke things on WordPress.com and elsewhere. I don't think it's safe to cache the results of wp_mkdir_p() in a persistent cache, but caching it non-persistently seems fine. I think we need to go back to the approach in https://core.trac.wordpress.org/attachment/ticket/34359/34359.3.patch, storing the results in a non-persistent cache.
Attachments (2)
Change History (13)
This ticket was mentioned in Slack in #core by azaozz. View the logs.
11 years ago
#3
in reply to: ↑ 1
@
11 years ago
Replying to ocean90:
@barry Out of interest, can you share what was broken exactly?
Essentially the exact thing mentioned in this comment. The WordPress.com use case is a bit more complicated, but basically we ended up caching a value for the upload dir from operations run on server A and when operations ran on server B and the directory didn't exist, the upload just fails because of the persistent cache, rather than trying to create the directory.
This ticket was mentioned in Slack in #core by swissspidy. View the logs.
11 years ago
#6
@
11 years ago
Looking more: there's no need to check if $tested_paths is array as it is set just before that. In 36621.1.patch.
@barry Out of interest, can you share what was broken exactly?