clean_site_cache

Fires immediately after a site has been removed from the object cache.

Description

do_action( 'clean_site_cache', (int) $blog_id, (WP_Site) $blog, (string) $domain_path_key ); 

Parameters (3)

0. $blog_id (int)
The blog id.
1. $blog (WP_Site)
Site object.
2. $domain_path_key (string)
Md5 hash of domain and path.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'clean_site_cache', $blog_id, $blog, $domain_path_key ); 
The following example is for adding a hook callback.
  1. // define the clean_site_cache callback 
  2. function action_clean_site_cache( $blog_id, $blog, $domain_path_key ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'clean_site_cache', 'action_clean_site_cache', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'clean_site_cache', 'action_clean_site_cache', 10, 3 ); 

Defined (1)

The action is defined in the following location(s).

/wp-includes/ms-blogs.php  
  1. do_action( 'clean_site_cache', $blog_id, $blog, $domain_path_key );