wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_suspend_cache_invalidation › WordPress Function

Seit2.7.0
Veraltetn/v
wp_suspend_cache_invalidation ( $suspend = true )
Parameter:
  • (bool) $suspend Optional. Whether to suspend or enable cache invalidation. Default true.
    Erforderlich: Nein
    Standard: true
Gibt zurück:
  • (bool) The current suspend setting.
Definiert in:
Codex:

Suspends cache invalidation.

Turns cache invalidation on and off. Useful during imports where you don't want to do invalidations every time a post is inserted. Callers must be sure that what they are doing won't lead to an inconsistent cache when invalidation is suspended.


Quellcode

function wp_suspend_cache_invalidation( $suspend = true ) {
	global $_wp_suspend_cache_invalidation;

	$current_suspend                = $_wp_suspend_cache_invalidation;
	$_wp_suspend_cache_invalidation = $suspend;
	return $current_suspend;
}