Throughout the years SiteGround accomplished remarkable results in terms of performance and loading speed of our clients’ websites. To name a few of our achievements: frequent change of server gear with newer and more powerful one; rewriting the most commonly used software (such as Apache & php) in order to serve web pages even faster; tuning up our OS so it serves millions of requests per minute; adding multiple server locations across the globe so that content is nearer to your users, etc.
We like what we’ve accomplished so far. Our clients seem to appreciate it as well. In a recent survey we conducted, 93% of our clients were really satisfied with the speed and performance of their websites hosted by SiteGround.
Still, we wanted to go beyond fast loading times. We wanted to improve and strengthen your site to hold up against massive traffic spikes and handle 100 times more of their normal traffic. The only way to accomplish that was to add different layers of caching. That was a really complicated task on a shared hosting environment. It took more than 6 months to build, and a lot of people along the way told me, what we were doing was impossible on shared hosting. But it’s finally live! 😉
What is SuperCacher and how does it work?
SuperCacher is a web caching service that we developed internally and exclusively at SiteGround. It sits in front of your web server (e.g. Apache). Whenever a browser requests to load a web page from SiteGround’s web server, the web server returns the HTML result to the browser AND the cache stores a copy of that same page. Next time that particular page is requested, the request gets served from the cache directly while the web server sits idle. Cache is known to significantly reduce the impact of many visitors/hits onto your website’s loading speed by sparing the resources of your host server and delivering the websites dramatically faster. SuperCacher is flexible, as it has several layers of caching available and more to come in the future.
Three Layers of Caching by SiteGround SuperCacher
1) Static Cache is the simplest form of caching. What it does is when a page of your site is loaded, it takes a copy of your static content – e.g. Images, CSS Stylesheets, Java Scripts, Flash Objects, etc. – and puts them into the servers’ RAM Memory. Next time that same object is required – say an image – it would be loaded from the servers’ RAM which is dramatically faster than loading an image from the Servers’ hard drives. And should you multiply this by a big number of visitors at the same time, the impact would be… spectacular 😉
Who is it for? Static cacheis suitable for any kind of website. It’s enabled by a simple on/off switch in your cPanel -> SuperCacher.
2) Memcached is probably the most popular memory caching system that is used by thousands of database-driven sites on the Internet including YouTube, Facebook, Wikipedia. It speeds up these websites by caching results from database queries in RAM. Thus, if the result of the same query is needed again, it will be instantaneously taken from the RAM, rather than generated again from the Database, which is usually a slower process and requires more computing power.
Memcached was one of the things that’s almost impossible to do on shared hosting. I’m proud to say that we’re the only host that offers Memcached on a shared hosting environment.
Who is it for? Memchaced is available to all our clients in their cPanel => SuperCacher. However, please keep in mind that in order to use Memcached your app would have to support it. Some apps have native support for it (e.g. Joomla, Mediawiki & Magento), though some additional configuration may be needed to make it work. Other apps, like WordPress, need additional plugin to be added in order to use Memcached.
3) Dynamic Cache is by far the most complicated thing we’ve ever done. Dynamic cache differs from Static cache and Memcached by one simple thing – the latter two only cache parts of your website – e.g. images or a query result. With Dynamic Cache the whole web pages are cached. In order to explain how dynamic caching works, I’d need to go into some more detail on how dynamic web languages (such as PHP) work.
Web browsers don’t understand PHP. They do understand HTML though. So even if your webpage was purely PHP written, it would still generate HTML code and send it to the web browser, so that the browser could actually understand it and display it to the user. PHP as a programming language is used so that the content of that same HTML is changed dynamically and upon a set of conditions predefined by the web creator.
What’s dynamic data then? Say, you want to show what date it is on a web page – that’s dynamic content, cause it would change over time. Another simple example – dynamic content can allow you to show to a person from Australia a kangaroo page and to a person from Bali a golden beach page on the homepage of your site.
How does caching work , when everything is dynamic? Well, the concept is simple. Every time the webserver generates an HTML page from the PHP, that page is cached by SuperCacher. Next time that page is requested, the pure HTML would be displayed form the Cache which is in RAM, and as opposed to wasting CPU and I/O resources to read the PHP file from the disk, the cached result is much faster to display with almost none resources wasted.
Who is it for? As explained, the nature of dynamic cache is much more complex than the static cache. Therefore it is only available for our WordPress and Joomla users for now. We’d be adding more applications soon, with Magento on our short-term to do list.
Possible Issues? In fact there are few. In order for dynamic cache to work properly, it needs to flush the cache any time something new is added to your site. Say, you have a WordPress site and add a new blog post. If cache is not flushed, that new post won’t appear, since results will be served from the cache and the cache won’t have that new blog post. But we’ve thought about that as well - we’ve written plugins you need to download for WordPress & Joomla, before turning SuperCacher Dynamic on. Those plugins will make sure each time there’s something new, your cache is purged and content is displayed properly 🙂
Each caching level of our SuperCacher service can increase website performance hundreds of times and reduce the impact of your website onto the server dramatically. And when enabled simultaneously, all three layers of caching give outstanding results, to say the least. To activate all three or a single layer of caching for your website, simply go to cPanel and click on the SuperCacher icon, then enable the cache type of your choice.
Once you try it out, post a comment about your experience below! We’ll be happy to hear what you think and examine any results and improvements you have achieved.