Ready to get started?Download WordPress


Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp suspend cache invalidation


Suspend cache invalidation.

Turns cache invalidation on and off. Useful during imports where you don't wont 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.


<?php wp_suspend_cache_invalidation$suspend ); ?>


(boolean) (optional) Whether to suspend or enable cache invalidation
Default: true

Return Values

The current suspend setting

Change Log

Since: 2.7

Source File

wp_suspend_cache_invalidation() is located in wp-includes/functions.php