Managing Website Server-Side Caches

This is a more in depth article on how we manage server-side caching at FatLab. If you are looking for how to clear browser caches, we have an article for that too.

What is Server-Side Website Caching?

Unless there are special circumstances all hosting clients at FatLab utilize several types of server-side caching that may affect how you update your website. Caching is when we keep a copy of a file (web page, image, PDF, video, etc.) in manner that doesn’t require the main server to “process” the request but simply dish up an already processed copy as quickly as possible (I’m avoiding the nerd technical details here). This, simply put speeds up the loading time of the website.

Technical Details*

Server Memory: Varnish (24 hours)
Static Pages: WP Rocket (10 Hours)
Static Assets: CDN (Perma-Cache – Contact to clear)

* We can customize settings for individual clients, these are “standard.”

Why We Use Caching

It speeds up the website by reducing load times.

Caching Types Used at FatLab Managed WordPress Hosting

Varnish

All of our servers run Varnish. Varnish keeps copies of your processed web pages in memory and serves those when a request comes in. Utilizing memory to store a copy of a web page is much faster than asking the actual web server to run all the required scripts, make all the required database calls, collect all the required assets (images, JavaScript, CSS, etc.) and deliver them to the site visitor. Our Varnish servers cache time is set to 24 hours.

Static Page Caching

We utilize a performance plugin called WP Rocket, this plugin does many things to help speed up your website. In regard to caching, it creates a static copy of every page in your site. This plugin is designed to play nicely with Varnish. So basically, a static version of your site pages is created, and file is stored on the server. This, like Varnish, saves the server all the processing power that is required to generate a page and as a result is much faster.

So basically, the way this works is that WP Rocket creates a static page and then when the page is requested a copy of that static page is held in memory (Varnish) for up to 24 hours.

Database Caching

We utilize a database caching system called Redis. Because of Varnish and static page caching by WP Rocket, Redis is mostly used to speed up the administrative area of the website where page caching does not occur. However, it sometimes aids in custom applications that are data heavy and are dynamic in nature making it so we can’t use other forms of caching. Most of our clients do not need to concern themeless at all with database caching.

Making Changes and Clearing the Cache

Obviously if you make a change to your content, you don’t want to have to wait 24 hours for that to show up on the public facing website. Most the time this is all done automatically for you. When you edit content of a page or post, for example, and hit save. Both the static page cache and Varnish are cleared for that particular page.

However, there are times when you may be making changes to things that are not page content. For example, let’s say you make an edit to the footer of your website. Well saving this is not going to clear the cache for every page in your site that shows the footer. In this case you need to manually clear to the server-side cache.

How to Clear the Website Cache

clear wp rocket website cache

 

Clearing your full web cache is easy. Any site that utilizes WP Rocket will have a menu item at the top of the Admin area, “WP Rocket,” in the submenu of this menu item is an item, “Clear Cache”.

This will clear the static page caches AND the Varnish cache effectively allowing your site to reload and show all your changes. This is the only setting that most people ever need to use when hosted with us.

Disabling Server-Side Caches

If you or someone working for you is ever making bulk changes to your site, especially changes to the files, we are able to turn off caching temporarily to make working on your site more efficient.

Deactivating the Redis and WP Rocket plugins temporarily will turn those off. You will need to contact us to have Varnish turned off.

Remember these are all here to aid in the performance of your website. So please let us know if you need these turned off and when we can turn them back on.

Use a Staging Site

Also remember if you are making substantial changes to your site, we can setup a staging site with no caching enabled and help migrate that once work is complete.

Category: Web Hosting

Post by Shane Larrabee

Shane Larrabee is founder of FatLab, LLC and has over 20 years experience as a business leader, web developer and online communication consultant.