clean_site_details_cache

Cleans the site details cache for a site.

Description

clean_site_details_cache( (int) $site_id = 0 ); 

Parameters (1)

0. $site_id — Optional. (int)
Site ID. Default is the current site ID.

Usage

  1. if ( !function_exists( 'clean_site_details_cache' ) ) { 
  2. require_once ABSPATH . WPINC . '/ms-blogs.php'; 
  3.  
  4. // Optional. Site ID. Default is the current site ID. 
  5. $site_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = clean_site_details_cache($site_id); 
  9.  

Defined (1)

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

/wp-includes/ms-blogs.php  
  1. function clean_site_details_cache( $site_id = 0 ) { 
  2. $site_id = (int) $site_id; 
  3. if ( ! $site_id ) { 
  4. $site_id = get_current_blog_id(); 
  5.  
  6. wp_cache_delete( $site_id, 'site-details' ); 
  7. wp_cache_delete( $site_id, 'blog-details' );