<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cache control | Digital Nomad Blog</title>
	<atom:link href="https://online-dentist.hu/en/tag/cache-control/feed/" rel="self" type="application/rss+xml" />
	<link>https://online-dentist.hu</link>
	<description></description>
	<lastBuildDate>Sat, 17 Jan 2026 10:53:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://online-dentist.hu/wp-content/uploads/2025/11/cropped-logo_circle_transparent-32x32.png</url>
	<title>Cache control | Digital Nomad Blog</title>
	<link>https://online-dentist.hu</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>[8] When a Scheduled Cache Task Broke My Sitemaps, and How I Rebuilt the Whole System</title>
		<link>https://online-dentist.hu/en/when-a-scheduled-cache-task-broke-my-sitemaps-and-how-i-rebuilt-the-whole-system/</link>
					<comments>https://online-dentist.hu/en/when-a-scheduled-cache-task-broke-my-sitemaps-and-how-i-rebuilt-the-whole-system/#respond</comments>
		
		<dc:creator><![CDATA[Steve – Digital Nomad]]></dc:creator>
		<pubDate>Fri, 07 Nov 2025 09:16:15 +0000</pubDate>
				<category><![CDATA[How I Built IT]]></category>
		<category><![CDATA[Cache control]]></category>
		<category><![CDATA[Cron]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://online-dentist.hu/?p=4222</guid>

					<description><![CDATA[<p>Cache preload was not working because Polylang and AIOSEO sitemaps conflicted. The solution: completely disable Google XML Sitemaps and core sitemap.</p>
<p>The post <a href="https://online-dentist.hu/en/when-a-scheduled-cache-task-broke-my-sitemaps-and-how-i-rebuilt-the-whole-system/">[8] When a Scheduled Cache Task Broke My Sitemaps, and How I Rebuilt the Whole System</a> first appeared on <a href="https://online-dentist.hu">Digital Nomad Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2>Step 1: It All Started with a Cron Job</h2>
<div>&nbsp;</div>
<div>The story began with a simple goal:</div>
<div>I wanted the W3 Total Cache preload to automatically rebuild page caches every few hours.</div>
<div>&nbsp;</div>
<div>The preload uses a sitemap as its source, so I set this:</div>
<div>&nbsp;</div>
<div><a href="https://online-dentist.hu/sitemap.xml" target="_blank" rel="noopener">https://online-dentist.hu/sitemap.xml</a></div>
<div>&nbsp;</div>
<div>The cron job was in cPanel:</div>
<div>&nbsp;</div>
<div>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">cd /home/onlinedentist/public_html &amp;&amp; /usr/local/bin/php /home/onlinedentist/public_html/wp-cron.php</pre>
<p>&nbsp;</p>
</div>
<div>…but soon, I noticed something strange: the cache folders were barely filling up &#8211; out of more than 300 multilingual pages, only a handful were cached.</div>
<div>&nbsp;</div>
<div>That was the first clue something deeper was broken.</div>
<div>&nbsp;</div>
<h2>Step 2: The Real Culprit &#8211; AIOSEO, Polylang, and a Broken Sitemap</h2>
<div>&nbsp;</div>
<div>My site runs in two languages using Polylang.</div>
<div>At that time, I also used All in One SEO (AIOSEO), which had its own sitemap system.</div>
<div>When I checked the sitemap index, it looked like this:</div>
<div>&nbsp;</div>
<div>It claimed there were 317 URLs.</div>
<div>But when I clicked one of the sub-sitemaps, there were no items…</div>
<div>&nbsp;</div>
<div>I got this message: “Didn’t expect to see this? Make sure your sitemap is enabled and your content is set to be indexed.”</div>
<div>&nbsp;</div>
<div>So AIOSEO’s sitemap system didn’t actually work with Polylang.</div>
<div>The W3 Total Cache preload relied on it &#8211; and since it was broken, the cache preload had no URLs to warm up.&nbsp;</div>
<div>&nbsp;</div>
<h2>Step 3: Switching to Google XML Sitemaps</h2>
<div>&nbsp;</div>
<div>To fix this, I replaced AIOSEO’s sitemap module with the old but reliable Google XML Sitemaps plugin &#8211; which creates a true, working sitemap.</div>
<div>&nbsp;</div>
<div>This plugin ignores Polylang and lists all pages from all languages, so W3TC finally had a valid source for its preload job.</div>
<div>&nbsp;</div>
<div>After enabling it, my cache folders started filling up properly &#8211; both /hu/ and /en/ pages were cached automatically.</div>
<div>&nbsp;</div>
<h2>Step 4: The Next Problem &#8211; Double Sitemaps</h2>
<div>&nbsp;</div>
<div>Right after fixing that, a new warning appeared in the WordPress dashboard:</div>
<div>&nbsp;</div>
<blockquote>
<div>“One or more plugins are affecting your site’s ability to be indexed.”</div>
</blockquote>
<div>&nbsp;</div>
<div>I checked and realized WordPress itself was still generating its own sitemap.</div>
<div>&nbsp;</div>
<div>Now I had two sitemaps again:</div>
<div>&nbsp;</div>
<ul>
<li>/sitemap.xml (from the plugin, correct)</li>
<li>/wp-sitemap.xml (from WordPress core, unnecessary)</li>
</ul>
<div>&nbsp;</div>
<div>To clean things up, I decided to disable the core sitemap completely.</div>
<div>&nbsp;</div>
<h2>Step 5: Disabling the WordPress Core Sitemap</h2>
<div>&nbsp;</div>
<div>I tried the official filter first:</div>
<div>&nbsp;</div>
<div>
<pre class="EnlighterJSRAW" data-enlighter-language="php">add_filter( 'wp_sitemaps_enabled', '__return_false' );</pre>
<p>&nbsp;</p>
</div>
<div>But it didn’t work &#8211; the sitemap stayed alive.</div>
<div>So I added a stronger block in my functions.php:</div>
<div>&nbsp;</div>
<div>
<pre class="EnlighterJSRAW" data-enlighter-language="php">add_action( 'init', function() {
    remove_action( 'init', 'wp_sitemaps_get_server' );
    add_filter( 'wp_sitemaps_enabled', '__return_false', 9999 );
}, 0 );
</pre>
<p>&nbsp;</p>
</div>
<div>And to make sure it was completely gone, I placed this .htaccess rule above the WordPress section:</div>
<div>&nbsp;</div>
<div>
<pre class="EnlighterJSRAW" data-enlighter-language="apache"># --- Disable WordPress core sitemap ---
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/wp-sitemap\.xml$ [OR]
RewriteCond %{REQUEST_URI} ^/wp-sitemap-index\.xml$ [OR]
RewriteCond %{REQUEST_URI} ^/wp-sitemap-posts-[0-9]+\.xml$
RewriteRule .* - [R=404,L]
&lt;/IfModule&gt;</pre>
<p>&nbsp;</p>
</div>
<div>After this, /wp-sitemap.xml finally returned 404 Not Found, while /sitemap.xml continued to work normally.</div>
<div>&nbsp;</div>
<h2>Step 6: Verifying the Robots.txt and Cache Integration</h2>
<div>&nbsp;</div>
<div>Once the sitemap situation was stable,</div>
<div>I checked the virtual robots.txt (generated by WordPress) &#8211; it already contained the correct sitemap reference:</div>
<div>&nbsp;</div>
<div>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php</pre>
</div>
<div>&nbsp;</div>
<div>No need for a physical robots.txt file.</div>
<div>Then, in W3 Total Cache → Page Cache → Cache Preload, I confirmed:</div>
<div>&nbsp;</div>
<div>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">Sitemap URL: https://online-dentist.hu/sitemap.xml
Update interval: 1800 seconds
Pages per interval: 10</pre>
<p>&nbsp;</p>
</div>
<div>The next scheduled cron run rebuilt the entire cache successfully.&nbsp;</div>
<div>&nbsp;</div>
<h3>What I Learned</h3>
<div>&nbsp;</div>
<ul>
<li>Scheduled cache preloading only works if the sitemap works.</li>
<li>A broken or plugin-conflicted sitemap silently breaks the preload job.</li>
<li>AIOSEO and Polylang don’t play well together.</li>
<li>The sitemap index looks correct, but the sub-sitemaps are often invalid.</li>
<li>Google XML Sitemaps still works best for multilingual static sitemaps.</li>
<li>It doesn’t overthink language folders &#8211; it just lists every URL.</li>
<li>The WordPress core sitemap must be disabled when using a custom sitemap plugin, or you’ll confuse both Google and W3TC.</li>
<li>Virtual files are fine.</li>
<li>You don’t need physical robots.txt or sitemap.xml &#8211; WordPress can handle them dynamically.</li>
</ul>
<div>&nbsp;</div>
<h3>Final Thoughts</h3>
<div>&nbsp;</div>
<div>This fix began as a routine optimization &#8211; a simple cron job for W3TC &#8211; but it led me deep into WordPress internals, SEO plugin conflicts, and how virtual endpoints really work.</div>
<div>&nbsp;</div>
<div>Now my site has:</div>
<div>&nbsp;</div>
<ul>
<li>One active sitemap (/sitemap.xml)</li>
<li>One dynamic robots.txt</li>
<li>A fully working cache preload system</li>
</ul>
<div>&nbsp;</div>
<div>Sometimes improving performance means stripping away the unnecessary &#8211; not adding more tools, but making sure the ones you already have actually talk to each other.</div><p>The post <a href="https://online-dentist.hu/en/when-a-scheduled-cache-task-broke-my-sitemaps-and-how-i-rebuilt-the-whole-system/">[8] When a Scheduled Cache Task Broke My Sitemaps, and How I Rebuilt the Whole System</a> first appeared on <a href="https://online-dentist.hu">Digital Nomad Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://online-dentist.hu/en/when-a-scheduled-cache-task-broke-my-sitemaps-and-how-i-rebuilt-the-whole-system/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[2] From Cache Chaos to Performance Clarity</title>
		<link>https://online-dentist.hu/en/from-cache-chaos-to-performance-clarity/</link>
					<comments>https://online-dentist.hu/en/from-cache-chaos-to-performance-clarity/#respond</comments>
		
		<dc:creator><![CDATA[Steve – Digital Nomad]]></dc:creator>
		<pubDate>Mon, 27 Oct 2025 17:39:59 +0000</pubDate>
				<category><![CDATA[How I Built IT]]></category>
		<category><![CDATA[Cache control]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://online-dentist.hu/?p=4022</guid>

					<description><![CDATA[<p>Diagnosing cache chaos: from WP Rocket failure to LiteSpeed misfire, finally mastering W3 Total Cache for a fast, stable, and fully preloaded WordPress site.</p>
<p>The post <a href="https://online-dentist.hu/en/from-cache-chaos-to-performance-clarity/">[2] From Cache Chaos to Performance Clarity</a> first appeared on <a href="https://online-dentist.hu">Digital Nomad Blog</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2>How I Diagnosed and Fixed a Complex Caching Conflict on a WordPress Website</h2>
<p>When you build websites for a living, you eventually face the same paradox I did: <strong>Your optimization plugin becomes the bottleneck.</strong></p>
<p>That’s exactly what happened to me while optimizing my WordPress site &#8211; online-dentist.hu. This post is a deep-dive case study of how I went from “cache doesn’t work at all” to a fast, stable, and fully automated setup, combining the best of modern WordPress performance practices.</p>
<h3>The Background</h3>
<p>My site was running WP Rocket, one of the most popular speed optimization plugins.<br />
However, despite correct configuration and a valid license, the cache never activated.</p>
<p>The response headers always returned:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml"># yaml

cache-control: no-cache, no-store, must-revalidate
x-powered-by: PHP/8.4.12</pre>
<p>&nbsp;</p>
<p>The WP Rocket “Cache” tab was missing, and even though the plugin created cache files under<br />
/wp-content/cache/wp-rocket/, the server never served them.<br />
So began a deep technical journey into headers, .htaccess rules, and server-level cache control.</p>
<h2>Step 1: Debugging WP Rocket</h2>
<p>Over several rounds of testing, I:</p>
<ul>
<li>verified headers through DevTools and WebPageTest,</li>
<li>inspected .htaccess, advanced-cache.php, and wp-config.php,</li>
<li>reinstalled WP Rocket cleanly,</li>
<li>and even wrote a custom PHP header plugin to override Cache-Control.</li>
</ul>
<p>Despite all this, the cache remained inactive &#8211; no x-rocket-cache: hit, no static file delivery.</p>
<p>The final clue came from my hosting provider’s support team:</p>
<blockquote><p>“Your server uses Apache. LiteSpeed (Accelerate WP) is available, but the Rocket rewrite rules won’t apply here.”</p></blockquote>
<p>In other words, WP Rocket was operating in PHP-only mode &#8211; optimizing assets, but not caching statically.</p>
<h2>Step 2: Switching to LiteSpeed Cache</h2>
<p>Following the provider’s advice, I activated Accelerate WP, which is essentially LiteSpeed Cache. Initially, I was optimistic &#8211; the plugin integrated well, and PageSpeed scores jumped slightly.</p>
<p>However, when inspecting response headers, I saw:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml"># yaml

x-litespeed-cache-control: no-cache
x-litespeed-server-type: NONE</pre>
<p>&nbsp;</p>
<p>That second line said it all:</p>
<p>The site wasn’t running on a real LiteSpeed server &#8211; it was still Apache behind the scenes. The plugin worked only as a frontend optimizer, not as a true server-level cache.</p>
<h2>Step 3: The Aha Moment: W3 Total Cache</h2>
<p>So I made a final switch to W3 Total Cache, a plugin I had used many years ago &#8211;<br />
and it instantly clicked (literally).</p>
<p>The response headers finally looked like this:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml"># yaml

cache-control: max-age=3600, public
etag: "44af3fc372e6e07881169370dc86fed2"
last-modified: Wed, 15 Oct 2025 10:50:41 GMT
x-powered-by: W3 Total Cache/2.8.1</pre>
<p>&nbsp;</p>
<p>At last &#8211; proper caching, full gzip compression, and predictable static file handling.</p>
<p><a href="https://www.webpagetest.org/" target="_blank" rel="noopener">WebPageTest</a> confirmed it:</p>
<figure id="attachment_4025" aria-describedby="caption-attachment-4025" style="width: 550px" class="wp-caption aligncenter"><a href="https://online-dentist.hu/wp-content/uploads/2025/10/hi_2_webpage_metrics.jpg?x78996"><img fetchpriority="high" decoding="async" class="size-full wp-image-4025" src="https://online-dentist.hu/wp-content/uploads/2025/10/hi_2_webpage_metrics.jpg?x78996" alt="" width="550" height="117"></a><figcaption id="caption-attachment-4025" class="wp-caption-text">WebPageTest Metrics</figcaption></figure>
<p>&nbsp;</p>
<p>It wasn’t just faster &#8211; it was consistent.</p>
<h2>Step 4: Fixing Mobile and Post Pages</h2>
<p>After celebrating, I noticed a new issue: Blog post pages sometimes failed to load on mobile devices.</p>
<p><strong>The reason?</strong></p>
<p>By default, W3 Total Cache serves a single static HTML version for all devices &#8211; unless you manually enable Mobile User Agent Groups.</p>
<p><strong>Solution</strong>:</p>
<ul>
<li>Navigate to Performance → User Agent Groups.</li>
<li>Enable “Mobile” and “Create a separate cache group.”</li>
<li>Purge all caches.</li>
</ul>
<p>That fixed it instantly &#8211; mobile visitors now get their own cached version, and posts render perfectly.</p>
<h2>Step 5: Preloading the Cache</h2>
<p>By default, W3 builds cache files on first visit, which means the first user after a purge always triggers a slow load.</p>
<p>To automate this, I enabled:</p>
<ul>
<li>Automatic page cache priming (sitemap preload) under Performance → Page Cache</li>
<li>Sitemap: https://online-dentist.hu/sitemap.xml</li>
<li>Interval: every 15 minutes, 20 pages per batch</li>
</ul>
<p>Additionally, I tested WP Warm Cache, a simple but powerful plugin that preloads all URLs in the background.</p>
<p>Now, the cache stays warm 24/7 &#8211; even when no one visits.</p>
<h2>Results &amp; Key Takeaways</h2>
<p>After the final setup:</p>
<ul>
<li>TTFB: 0.4–0.6 s</li>
<li>LCP: &lt; 2.5 s</li>
<li>Speed Index: ~4 s</li>
<li>Mobile PageSpeed: 90+ consistently</li>
<li>Server load: Stable, low CPU usage</li>
</ul>
<h2>What I Learned</h2>
<ul>
<li>Not all cache plugins can work on every server.
<ul>
<li>WP Rocket expects write access and proper .htaccess rewriting &#8211; not always possible on shared Apache hosting.</li>
</ul>
</li>
<li>LiteSpeed Cache ≠ LiteSpeed Server.
<ul>
<li>Unless your host runs LSWS or OLS, the plugin can’t deliver cached HTML.</li>
</ul>
</li>
<li>W3 Total Cache remains a powerhouse
<ul>
<li>especially for Apache-based WordPress sites that need predictable caching and full control.</li>
</ul>
</li>
<li>Always verify with response headers, not assumptions.
<ul>
<li>The truth is in cache-control and x-powered-by.</li>
</ul>
</li>
<li>Preload is everything.
<ul>
<li>A cache is only useful if it’s ready before your visitors arrive.</li>
</ul>
</li>
</ul>
<p><strong>Final Thought</strong></p>
<p>It took patience, dozens of tests, and some friendly frustration, but I finally turned a stubborn WordPress install into a finely tuned, high-performing system.</p>
<p>The takeaway?</p>
<p>Speed doesn’t come from a single plugin &#8211; it comes from understanding how they interact with your server.</p><p>The post <a href="https://online-dentist.hu/en/from-cache-chaos-to-performance-clarity/">[2] From Cache Chaos to Performance Clarity</a> first appeared on <a href="https://online-dentist.hu">Digital Nomad Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://online-dentist.hu/en/from-cache-chaos-to-performance-clarity/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 18/413 objects using Disk
Page Caching using Disk: Enhanced 

Page cache debug info:
Engine:             Disk: Enhanced
Cache key:          online-dentist.hu/en/tag/cache-control/feed/_index_slash_ssl.xml
Creation Time:      1781035766.000s
Header info:
Last-Modified:      Tue, 02 Jun 2026 19:28:24 GMT
ETag:               "d6649de0a4c79b0db2730dba092bc5be"
X-Powered-By:       W3 Total Cache/2.9.4
X-Robots-Tag:       noindex, follow
Link:               <https://online-dentist.hu/wp-json/>; rel="https://api.w.org/"
Link:               <https://online-dentist.hu/wp-json/wp/v2/tags/523>; rel="alternate"; title="JSON"; type="application/json"
Content-Type:       application/rss+xml; charset=UTF-8

Database Caching using Disk (Request-wide modification query)

Served from: online-dentist.hu @ 2026-06-09 20:09:26 by W3 Total Cache
-->