Make WordPress Core

Changeset 37618


Ignore:
Timestamp:
06/02/2016 12:58:40 AM (9 years ago)
Author:
jeremyfelt
Message:

Multisite: Bump last_changed cache on site update and creation

When a site is added, updated, or deleted, the site_ids cache for a query will no longer be reliable. Bumping last_changed will force a new query for site IDs.

See #35791.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-blogs.php

    r37616 r37618  
    466466     */
    467467    do_action( 'clean_site_cache', $blog_id, $blog, $domain_path_key );
     468
     469    wp_cache_set( 'last_changed', microtime(), 'sites' );
    468470}
    469471
  • trunk/src/wp-includes/ms-functions.php

    r37617 r37618  
    11481148    do_action( 'wpmu_new_blog', $blog_id, $user_id, $domain, $path, $site_id, $meta );
    11491149
     1150    wp_cache_set( 'last_changed', microtime(), 'sites' );
     1151
    11501152    return $blog_id;
    11511153}
Note: See TracChangeset for help on using the changeset viewer.