clean_network_cache()
Removes a network from the object cache.
Хуки из функции
Возвращает
null
. Ничего.
Использование
clean_network_cache( $ids );
- $ids(int|массив) (обязательный)
- Network ID or an array of network IDs to remove from cache.
Заметки
- Global. true|false. $_wp_suspend_cache_invalidation
Список изменений
С версии 4.6.0 | Введена. |
Код clean_network_cache() clean network cache WP 5.9.3
function clean_network_cache( $ids ) { global $_wp_suspend_cache_invalidation; if ( ! empty( $_wp_suspend_cache_invalidation ) ) { return; } foreach ( (array) $ids as $id ) { wp_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 ); } wp_cache_set( 'last_changed', microtime(), 'networks' ); }