wpseo_invalidate_sitemap_cache

This invalidates our XML Sitemaps cache.

Description

wpseo_invalidate_sitemap_cache( (string) $type ); 

Parameters (1)

0. $type (string)
Type of sitemap to invalidate.

Usage

  1. if ( !function_exists( 'wpseo_invalidate_sitemap_cache' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yoast-seo/inc/wpseo-functions-deprecated.php'; 
  3.  
  4. // Type of sitemap to invalidate. 
  5. $type = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wpseo_invalidate_sitemap_cache($type); 
  9.  

Defined (1)

The function is defined in the following location(s).

/inc/wpseo-functions-deprecated.php  
  1. function wpseo_invalidate_sitemap_cache( $type ) { 
  2. _deprecated_function( __FUNCTION__, 'WPSEO 3.2.0', 'WPSEO_Sitemaps_Cache::invalidate()' ); 
  3.  
  4. WPSEO_Sitemaps_Cache::invalidate( $type );