How Does Caching Work?

At Seravo the server caching layer has been built with great diligence to ensure that our clients websites run as fast as possible. This kind of caching orientation is not something many generic hosting-providers provide to their clients and at Seravo we strive to be above average. For example we offer an easy to enable advanced caching solution for our clients.

More information about caching in our blog.

What is a cache?

The idea of caching is simple, information is saved into a caching layer so that the next time the same information is requested it can be served from cache instead of loading it all again from the server. There are many different kind of caches, but with websites the most important cache is usually the HTTP-cache.

The changes made to the website don't always update instantly to the browser because of the browsers own caching layer. Often developers need to see their changes instantly, however, so the page must be refreshed without using the browsers cache. This can be done using the command ctrl+F5 (or when using Mac, shift-cmd-R/cmd-option-R)

Different cache layers renew themselves automatically so that the site visitors don't have to empty their own browser cache every time a change has been made to the site. At Seravo the server side cache is renewed in a 15 minute cycle, but the cache can also be emptied manually by running the command wp-purge-cache via SSH on the server. Cache can also be purged using the "Purge cache" button on the WordPress admin panel.

How the website handles cache depends on the choices made by the site developer. For example it is possible to build the site so that when loading specific content the site tells the browser to not use cache and as result the requested content is loaded completely from the server instead of cache.

Cache as a standard feature

Seravo.com’s system is an optimized WordPress environment, and there are caches at many levels: The HTTP cache at the front-end server, WordPress’s transients (stored with Redis), PHP shell caches, MariaDB database caches, Linux kernel caches, file system caches, etc. The caches have been built in such a way that they are updated automatically, when the original content, which they transmit, is updated. The software of an individual customer can only affect WordPress transients or HTTP headers, on which basis the HTTP headers are saved in caches in Seravo.com and various end-user proxies.



Clearing the cache from the control panel

You can easily clear cache directly from the top bar of the WordPress control panel with the "Clear Cache" button.

Clearing caches from the command line

You can easily clear the WordPress Redis object cache and the Nginx page cache concerning the entire site with one command:

$ wp-purge-cache

If necessary you can delete only the WordPress cache itself with the command:

$ wp cache flush

Delete database transients:

$ wp transient delete --all

For individual pages, you can skip the server caches by performing a , i.e. in most browsers by pressing Ctrl+F5 instead of just F5. You can also clear the entire sites cache from the WordPress control panel by clicking on the 'Purge cache' button located in the top bar.

Deep reload

For a single site, server caches can be bypassed by doing a so-called deep reload, i.e. pressing Ctrl+F5 instead of F5 in most browsers.


Further information about caching:

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.