Smart Sitemap Preload, Content Priority & Bounded Warmup Queue
Warm cached HTML automatically from WordPress Core, Yoast, Rank Math, and custom XML sitemaps in priority order with single-worker lock protection and CPU pacing.
- Automatically discovers WordPress Core (
wp-sitemap.xml), Yoast SEO, Rank Math, SEOPress, and All in One SEO sitemaps (PreloadDiscovery.php) plus custom XML sitemap URLs (CustomSitemaps.php). - Warms URLs in business-impact priority order (
ContentPriority.php)—Homepage & Key Landing Pages first, followed by WooCommerce Shop/Products, Recent Posts, and Taxonomy Archives. - Guards origin CPU and RAM via
PreloadWorkerLock.php(strictly 1 active worker per site), bounded batch ticks, and automatic pause/backoff if server load or loopback errors occur. - Exposes full queue visibility (
Pending,Warmed,Failed) inWP Admin -> KadiCache -> Preloadand 5 CLI subcommands inPreloadCli.php(start,status,run,pause,resume).
Why Proactive Sitemap Warmup Matters After Purges & Deployments#
Without background cache preloading, the very first real human visitor (or Googlebot crawl!) to land on each product or blog URL after a cache purge, theme update, or TTL expiration pays the full 400 – 800 ms uncached PHP + MySQL render cost (X-KadiCache: MISS). On a WooCommerce store with 1,500 products where long-tail items receive 5 organic search visits per day, cold cache misses can drag down 20% to 35% of real-visitor TTFB and LCP samples!
Conversely, aggressive external crawler preloader plugins often spawn 10 parallel wp_remote_get() threads simultaneously right after a post update—pegging shared-hosting CPU cores at 100% and triggering 503 Service Unavailable or Cloudflare bot blocks.
KadiCache’s Smart Sitemap Preload Engine (Preloader.php, PreloadDiscovery.php, ContentPriority.php, and PreloadWorkerLock.php) gives you warm caches on first arrival with predictable, gentle server resource usage.
Automatic Sitemap Discovery & Priority Ordering (ContentPriority.php)#
When you enable Sitemap Preload inside WP Admin -> KadiCache -> Preload (or click Purge & Preload in the top bar), PreloadDiscovery.php and SitemapXmlParser.php build a deduplicated, policy-filtered warmup queue:
Warmup Tier (ContentPriority.php) | URLs Included | Why This Order Matters |
|---|---|---|
| Priority 1 — Critical Entry Routes | Homepage (/), static Front/Blog page, WooCommerce main /shop/ archive | Absorbs 40%–60% of immediate visitor arrivals within the first 3 seconds of a purge |
| Priority 2 — High-Value Pages & Products | Top-level Pages & published WooCommerce Products (ContentPriorityDiscovery.php) | Keeps revenue-generating product landing pages and ad targets warm first |
| Priority 3 — Recent Articles & Posts | Recently published/updated blog posts ordered by recency | Protects fresh editorial traffic shared on social media & newsletters |
| Priority 4 — Taxonomies & Sitemap Tail | Product categories, blog categories, tags & custom XML sitemaps | Completes long-tail organic SEO coverage cleanly in the background |
UrlPolicy.php automatically filters out any URL matching your Excluded URL Paths, per-post Never cache this page rules (PostSettings.php), private WooCommerce cart/checkout pages, or off-origin links—so the preloader never wastes a single HTTP loopback request on an uncacheable route!
Single-Worker Lock & Origin CPU Pacing (PreloadWorkerLock.php)#
Every background warmup batch in KadiCache obeys four strict production safety guardrails:
- Exclusive Single-Worker Lock (
PreloadWorkerLock.php): Even if WP-Cron, Action Scheduler, and a manual CLI tick fire at the same moment, only one preload worker can hold the site lock—preventing parallel loopback stampedes. - Smart Skip on Already-Fresh Snapshots (
PreloadVisitInspector.php): Before requesting PHP to render a URL, KadiCache checks if a valid, non-expired cache snapshot already exists—skipping redundant renders automatically. - Multilingual & Currency Context Awareness (
CurrencyContext.php): Works cleanly alongside WPML, Polylang, TranslatePress, and multi-currency storefronts without polluting canonical guest buckets. - Pause / Resume Anytime: Need zero background traffic during a live database migration? Click Pause Preload in
WP Admin -> KadiCache -> Preload(or runwp kadicache preload pause) and click Resume when finished.
# 1. Start a fresh prioritized sitemap discovery & background warmup queue
wp kadicache preload start
# 2. Inspect live queue counts (pending, completed/warmed, failed) in JSON or text
wp kadicache preload status --format=json
# 3. Execute one bounded preload worker cycle synchronously (ideal for system cron!)
wp kadicache preload run --format=json
# 4. Pause or resume an active warmup queue non-destructively
wp kadicache preload pause
wp kadicache preload resume- Custom Product & Regional Sitemap Feeds (
CustomSitemaps.php): If an enterprise ERP or headless catalog generator publishes supplemental XML sitemaps outside your primary SEO plugin index (for examplehttps://example.com/promotions-sitemap.xml), paste those full HTTPS URLs into Custom Sitemap URLs insideWP Admin -> KadiCache -> Preload—KadiCache validates same-origin ownership and merges them into your warmup cycle automatically. - Monitoring Queue Health Over MCP (
get_preload_status): Agencies automating releases with Claude Code or KadiCache Pulse can pollget_preload_status(readscope) or triggermanage_preload(operatescope) remotely without SSH—confirming exact warmed, pending, and skipped URL counts across every deployment.
Automating Post-Deployment Warmup in Git & CI/CD Pipelines#
Engineering teams deploying theme updates via GitHub Actions, GitLab CI, Deployer, or Capistrano can wire KadiCache’s non-blocking CLI commands directly into their post-release hook so customers never hit cold caches after a deploy:
- Zero-Downtime Release Sequence: Run
wp kadicache repair(verifying drop-in &early-config.phpfingerprints against the newly deployed release), followed bywp kadicache purge --allandwp kadicache preload start. - Dedicated Cron Runner Option (
wp kadicache preload run): On high-traffic enterprise clusters where web containers disable web-triggered cron (DISABLE_WP_CRON = true), schedule* * * * * wp kadicache preload run --quieton your dedicated CLI worker node—each invocation runs one bounded, lock-protected batch and exits cleanly.
Frequently Asked Operational Questions
Does KadiCache detect Yoast SEO, Rank Math, and SEOPress sitemaps automatically?
Will running Sitemap Preload slow down my shared hosting server?
What is the difference between Purge All and Purge & Preload in the top bar?
Does Sitemap Preload request URLs that I excluded in Excluded URL Paths or Gutenberg?
Why did Preload pause or report loopback unavailable on a local Docker container?
Creator of KadiCache’s Early PHP Drop-In, 7-Driver Object Cache Engine, Cloud Remove Unused CSS, and Zero-CLS Lazy Render pipeline.