diff --git a/docs/features/xml-sitemaps/api.md b/docs/features/xml-sitemaps/api.md index 59421e3f..9aaf6d74 100644 --- a/docs/features/xml-sitemaps/api.md +++ b/docs/features/xml-sitemaps/api.md @@ -195,6 +195,28 @@ function filter_wpseo_sitemap_urlimages_front_page( $images ) { add_filter( 'wpseo_sitemap_urlimages_front_page', 'filter_wpseo_sitemap_urlimages_front_page' ); ``` +## Performance + +### Disable cache priming for sitemap generation + +By default, Yoast SEO primes the post, term, and featured-image caches in bulk before generating each sitemap batch. This avoids one database query per post on setups without a persistent object cache, but can occasionally interfere with custom caching layers. Use this filter to opt out of the bulk priming when needed. + +```php +