The original order was alphabetical, which became less obvious as newer functions got added, resulting in a somewhat random order.
This commits aims to organize the functions and related `WP_Object_Cache` methods in a more predictable order:
* `wp_cache_init()`
* `wp_cache_add()`
* `wp_cache_add_multiple()`
* `wp_cache_replace()`
* `wp_cache_set()`
* `wp_cache_set_multiple()`
* `wp_cache_get()`
* `wp_cache_get_multiple()`
* `wp_cache_delete()`
* `wp_cache_delete_multiple()`
* `wp_cache_incr()`
* `wp_cache_decr()`
* `wp_cache_flush()`
* `wp_cache_close()`
* `wp_cache_add_global_groups()`
* `wp_cache_add_non_persistent_groups()`
* `wp_cache_switch_to_blog()`
* `wp_cache_reset()`
Follow-up to [3011], [6543], [7986], [13066], [18580], [21403], [47938], [52700], [52703-52705].
See #54728, #54574.
Built from https://develop.svn.wordpress.org/trunk@52706
git-svn-id: http://core.svn.wordpress.org/trunk@52295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
While this was previously added and reverted more than once as part of various documentation cleanup efforts, `wp_cache_switch_to_blog()` appears to be the correct alternative for `wp_cache_reset()`, per the latter's DocBlock.
This commit also corrects the `@deprecated` tag for `WP_Object_Cache::reset()` to link to the `::switch_to_blog()` method of the class, instead of the function of the same name.
Follow-up to [13066], [21403], [22111], [33678], [34225], [34226], [40929].
See #54729.
Built from https://develop.svn.wordpress.org/trunk@52705
git-svn-id: http://core.svn.wordpress.org/trunk@52294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add new caching functions named `wp_cache_add_multiple`, `wp_cache_set_multiple` and `wp_cache_delete_multiple`. All of these functions allow for an array of data to be passed, so that multiple cache objects can be created / edited / deleted in a single function call. This follows on from [47938] where the `wp_cache_get_multiple` function was introduced and allowed for multiple cache objects to be received in one call.
Props: spacedmonkey, tillkruess, adamsilverstein, flixos90, mitogh, pbearne.
Fixes: #54574.
Built from https://develop.svn.wordpress.org/trunk@52700
git-svn-id: http://core.svn.wordpress.org/trunk@52289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Many caching backend have support for multiple gets in a single request. This brings that support to core, with a compatability fallback that will loop over requests if needed.
Fixes: #20875.
Props: nacin, tollmanz, wonderboymusic, ryan, jeremyfelt, spacedmonkey, boonebgorges, dd32, rmccue, ocean90, jipmoors, johnjamesjacoby, tillkruess, donmhico, davidbaumwald, SergeyBiryukov, whyisjake.
Built from https://develop.svn.wordpress.org/trunk@47938
git-svn-id: http://core.svn.wordpress.org/trunk@47711 1a063a9b-81f0-0310-95a4-ce76da25c4cd