wpseek.com
WordPress开发者和主题制作者的搜索引擎
clean_network_cache › WordPress Function
Since4.6.0
已弃用n/a
› clean_network_cache ( $ids )
| 参数: |
|
| 定义在: |
|
| 文档: |
Removes a network from the object cache.
Related Functions: clean_term_cache, clean_user_cache, clean_bookmark_cache, clean_category_cache, update_network_cache
源码
function clean_network_cache( $ids ) {
global $_wp_suspend_cache_invalidation;
if ( ! empty( $_wp_suspend_cache_invalidation ) ) {
return;
}
$network_ids = (array) $ids;
wp_cache_delete_multiple( $network_ids, 'networks' );
foreach ( $network_ids as $id ) {
/**
* 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 );
}
wp_cache_set_last_changed( 'networks' );
}