WordPress.org

Make WordPress Core

Ticket #21434: 21434.8.diff

File 21434.8.diff, 1020 bytes (added by ryan, 7 years ago)

Remove wp_cache_switch_to_blog() from _deprecated_function(). Note using wp_cache_init() in unit tests in phpdoc.

  • wp-includes/cache.php

     
    223223 * Reset internal cache keys and structures. If the cache backend uses global blog or site IDs as part of its cache keys,
    224224 * this function instructs the backend to reset those keys and perform any cleanup since blog or site IDs have changed since cache init.
    225225 *
     226 * This function is deprecated. Use wp_cache_switch_to_blog() instead of this function when preparing the cache for a blog switch.
     227 * For clearing the cache during unit tests, consider using wp_cache_init(). wp_cache_init() is not recommended outside of unit tests
     228 * as the performance penality for using it is high.
     229 *
    226230 * @since 2.6.0
    227231 * @deprecated 3.5.0
    228232 */
    229233function wp_cache_reset() {
    230         _deprecated_function( __FUNCTION__, '3.5', 'wp_cache_switch_to_blog()' );
     234        _deprecated_function( __FUNCTION__, '3.5' );
    231235
    232236        global $wp_object_cache;
    233237