[wp-trac] [WordPress Trac] #34359: Cache output of `wp_upload_dir()` to improve performance
WordPress Trac
noreply at wordpress.org
Fri Jan 1 00:55:52 UTC 2016
#34359: Cache output of `wp_upload_dir()` to improve performance
-------------------------------------------+-------------------------------
Reporter: mikeschroder | Owner: mikeschroder
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
-------------------------------------------+-------------------------------
Changes (by azaozz):
* keywords: needs-testing needs-unit-tests has-patch => needs-testing has-
patch early
* milestone: Future Release => 4.5
Comment:
In 34359.3.patch:
- Non-persistent cache like in 34359.2.patch.
- Cacher the data before the `upload_dir` filter and run the filter every
time on the cached data.
- Introduce `wp_get_upload_dir()` for "light weight" use, when a file is
not being uploaded.
- Add cache refresh option to `wp_upload_dir()` and use it in the tests.
- Fix the test a bit: consolidate multiple calls to `gmstrftime()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34359#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list