domain_mapping_gc_cache()WPSCache 1.0

Хуков нет.

Возвращает

null. Ничего (null).

Использование

domain_mapping_gc_cache( $function, $directory );
$function (обязательный)
-
$directory (обязательный)
-

Код domain_mapping_gc_cache() WPSCache 1.12.0

function domain_mapping_gc_cache( $function, $directory ) {
	global $cache_path;

	if ( ! function_exists( 'domain_mapping_warning' ) ) {
		return;
	}

	$siteurl = domain_mapping_siteurl( false );
	if ( ! $siteurl ) {
		return;
	}

	$sitedir = trailingslashit( preg_replace( '`^(https?:)?//`', '', $siteurl ) );

	if ( 'homepage' === $directory ) {
		$directory = '';
	}

	switch ( $function ) {
		case 'rebuild':
			wpsc_rebuild_files( $cache_path . 'supercache/' . $sitedir . $directory );
			break;
		case 'prune':
			wpsc_delete_files( $cache_path . 'supercache/' . $sitedir . $directory );
			break;
	}
}