clean_network_cache()
最后更新于:2021-11-25 20:33:28
clean_network_cache( int|array$ids)Removes a network from the object cache.
参数
- $ids
-
(int|array) (Required) Network ID or an array of network IDs to remove from cache.
源文件
文件: gc-includes/ms-network.php
function clean_network_cache( $ids ) {
global $_gc_suspend_cache_invalidation;
if ( ! empty( $_gc_suspend_cache_invalidation ) ) {
return;
}
foreach ( (array) $ids as $id ) {
gc_cache_delete( $id, 'networks' );
/**
* Fires immediately after a network has been removed from the object cache.
*
* @since 4.6.0
*
* @param int $id Network ID.
*/
do_action( 'clean_network_cache', $id );
}
gc_cache_set( 'last_changed', microtime(), 'networks' );
}