Ticket #21434: 21434.7.diff

File 21434.7.diff, 1.0 KB (added by ryan, 8 months ago)

Deprecation phpdoc for wp_cache_reset().

Line 
1Index: wp-includes/cache.php
2===================================================================
3--- wp-includes/cache.php       (revision 22107)
4+++ wp-includes/cache.php       (working copy)
5@@ -223,6 +223,11 @@
6  * Reset internal cache keys and structures. If the cache backend uses global blog or site IDs as part of its cache keys,
7  * this function instructs the backend to reset those keys and perform any cleanup since blog or site IDs have changed since cache init.
8  *
9+ * This function is deprecated. Use wp_cache_switch_to_blog() instead of this function when preparing the cache for a blog switch.
10+ * For clearing data from the default cache backend in unit tests, consider using wp_cache_flush() or overwriting $wp_object_cache.
11+ * Note that wp_cache_flush() does not work portably across all object cache backends. It should be used only in unit tests that target
12+ * the default cache or a known backend that supports flushing for both single and multisite configurations.
13+ *
14  * @since 2.6.0
15  * @deprecated 3.5.0
16  */