- Feb 02, 2015
- by Brad Litwin
At A2 Hosting, we focus on offering you the fastest web hosting solutions possible. We recently launched our Turbo servers, our fastest hosting solution to date. One of the reasons our Turbo servers load sites so quickly is our A2 Optimized Site Accelerator. A2 Optimized is our exclusive cPanel plugin that quickly enables caching for your applications from a single interface for even faster page loads. Unlike other hosts who do not allow caching solutions on shared servers, Turbo customers get pre-configured caching with A2 Optimized.
So what is caching? Caching can involve the use of RAM or hard disk to store a temporary copy of a database query, PHP script or even an entire page for faster loading speeds. The caching solutions OpCode Cache (Zend OPCache or APC), Memcached (coming soon to A2 Optimized) and Turbo Cache can work together at different levels within A2 Optimized to produce an extremely fast web experience for your users. In short, OPcache is used for making PHP faster, Memcached increases MySQL speed and Turbo Cache speeds up page loads even further by caching the entire web page.
OPcache is used to accelerate the execution of PHP scripts. PHP is a scripting language that must be parsed and compiled into bytecode each time it is executed (as opposed to C++ which is compiled once and run from a binary file). OPcache allows the system to store a copy of the intermediary bytecode that is the last step before a PHP script is executed. This saves up to several tenths of a second each time a PHP file is requested. OPcache works at the server level and does not need to be configured by an application.
Memcached works at a different level than OPcache. An application can store database query results or html fragments in RAM by placing it in a Memcached data store. It can be used to quickly access the result of a query that might normally be run several times per page load. This reduces the processing power required to run your web application at the expense of a little memory.
Turbo Cache is a static file cache that stores a copy of an entire page that has been rendered by PHP. The entire contents of the HTML for a page is stored by Turbo Cache and can be quickly served up by the web server without ever executing PHP. This makes popular web pages extremely fast and significantly reduces the processing power required to run your web application to increase the number of customers that your site can serve at one time.