Page Caching

WordPress, being built with PHP and using a database, comes with some inherent overhead. Requesting data from the database takes time, plugin code adds a bit more time, and so does your theme. Before you know it, a site can be taking 5-10 seconds before it can even return a response (this is the plain HTML code), not to mention all the CSS, JS, images and fonts your page might need AFTER the browser gets the initial HTML from the page. In addition to that, if you can't afford quality hosting, your server might be overloaded from sharing resources with 200-300 other sites, and the overhead from all the PHP and database queries gets even worse!

Page Caching takes the HTML that is built for any particular page, and saves it to disk. Then, when the next person comes along and requests that particular page, the HTML that is pre-built gets delivered in record time, birds start singing, the sun starts shining, and all is right with the world once more... Well, a chap can dream, right? You might not get instant sunshine, but you WILL get faster page loads!

Clearing the Cache

Most of the time, SWIS will do this for you. If WordPress, a plugin, or a theme is updated, SWIS clears the cache. If you edit a page, SWIS clears the cache for that page. If someone comments on a page, SWIS clears the cache for that page too. SWIS will, of course, also clear the cache if you switch themes.
But if you need to clear the cache manually, you can do that at any time. Just point your peepers (eyeballs, not frogs) at the admin bar, and look for the SWIS menu. You can clear the whole cache, or go to any page, and clear the cache for just that URL.

WebP Variant

Now, let's get one thing straight. The best way to deliver WebP versions of your images is with server-based rules. I won't go into all the details on that, but there's .htaccess rules, Nginx rewrite rules, Cloudflare, and our Easy IO CDN. These all work the same:
  1. The server gets a request for
  2. It checks to see if the visitor is using a browser that supports WebP (most do) AND if there is a WebP version of my-awesomer-image.jpg.
  3. If #2, bam, it's delivered, no URLs changed, no HTML broken, hurrah!

We have some other WebP delivery options in the EWWW Image Optimizer, but they all have one fatal flaw: they change the HTML structure of your page to deliver WebP images.

So this is my second favorite WebP delivery option, and it's a great one! When SWIS caches your pages, it can build 2 copies (or variants): one for WebP browsers, and one for the poor saps on old browsers. These variants are completely identical in structure. The only difference is the image URLs themselves.

When someone visits your site, SWIS does a quick check for WebP support, and delivers the appropriate variant to the visitor. Double hurrah!

Cache Preload

Most sites aren't static, they change from time to time. And so the cache gets cleared, and now your visitors are getting slow page loads because the cache needs to be rebuilt. Never fear, just let cache preloading take care of that, and say goodbye to slow first page loads!

But how does it work?!?! Alright, I'll tell you, ease up already! First, it checks for site maps in known locations (sitemap_index.xml, sitemap.xml, and wp-sitemap.xml). If your sitemap is somewhere else, just holler and we'll add it to the list. But those covers all the common SEO plugins and stock WP behavior.

If SWIS absolutely can't find a sitemap, it'll grab the 1,000 most recently published posts/pages/content. From there, it uses "async" requests in the background to fetch each one of the URLs that have been found. By default, it pauses for 5 seconds in between requests, but you can change that with the swis_cache_preload_delay filter if you like. If a page is cached already, SWIS is clever enough to skip ahead and go to the next URL, so there's no double-dipping (gross, who does that!).

More Options?

Oh, you betcha! The Page Cache has even more options available via Overrides.

Still need help? Contact Us Contact Us