Multisite: Fire a `clean_site_cache` action when a site's cache is cleared
Props spacedmonkey. Fixes #36203. git-svn-id: https://develop.svn.wordpress.org/trunk@37204 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
137d716ebb
commit
ac48e52ab3
|
@ -454,6 +454,17 @@ function clean_blog_cache( $blog ) {
|
|||
wp_cache_delete( 'current_blog_' . $blog->domain . $blog->path, 'site-options' );
|
||||
wp_cache_delete( 'get_id_from_blogname_' . trim( $blog->path, '/' ), 'blog-details' );
|
||||
wp_cache_delete( $domain_path_key, 'blog-id-cache' );
|
||||
|
||||
/**
|
||||
* Fires immediately after a site has been removed from the object cache.
|
||||
*
|
||||
* @since 4.6.0
|
||||
*
|
||||
* @param int $id Blog ID.
|
||||
* @param WP_Site $blog
|
||||
* @param string $domain_path_key md5 hash of domain and path.
|
||||
*/
|
||||
do_action( 'clean_site_cache', $blog_id, $blog, $domain_path_key );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue