In this article we will look at how we leverage the Full Page Cache extension from Extendware to speed up Magento and improve page loading times. A full page cache aims to reduce site latency, increase the web server transaction rate, and reduce database load, resulting in a faster and much more responsive web site. Knowing that a web page’s load time has a direct influence on search engine ranking and shopping conversion rates, it becomes increasingly important to have a snappy web site.
Consider the following facts:
- Google considers site speed when ranking Web sites and determining how many pages to crawl1
- A study by Forrester Consulting determined that 47% of online consumers expect a web page to load in 2 seconds or less, and 52% said that site speed is important to their site loyalty2
- Gomez found that up to 40% of customers will abandon a shopping site if it takes more than 3 seconds to load and every second delay results in a 7% reduction in revenue3
This shows how important it is to stay within that 2-3 second threshold, or else you might be losing out to the competition.
We will now look at how ProperHost Magento optimized hosting combined with the Extendware Full Page Cache can help you achieve this goal. Through our partnership with Extendware, all ProperHost customers get one year free use of the Full Page Cache extension. Some of the features of the Full Page Cache extension include:
- Multi-level cache cupport
The Full Page Cache combines two cache systems into one. The first level cache is an extremely fast full page cache that increases server throughput by more than 50+ times. Requests that hit the first level cache will not even use the database. The second level cache is an advanced full page cache with hole-punch support. The second level cache will even work for logged in users, users with items in their cart, etc and further improves server throughput with a corresponding decrease in latency.
- Multiple store support
Multi-store / domain setups in a single Magento installation are fully supported. There is no need to worry about cross-site cache tainting or other issues commonly associated with other cache products.
- Increase requests per second and alleviate database load
The primary cache will increase requests per second (and decrease latency accordingly) by 26.5 times. The secondary cache will increase requests per second by 2.5 times. All requests hitting the primary cache will not use the database, so your database load will decrease significantly. The end result is a much faster, more responsive site.
- Hole punch support
The second level cache supports hole punches. This means that pages can be cached even when there is dynamic content, the user is logged in, etc. All the hole punches (11 in total) that are needed by a default Magento installation are included. Creating new hole punches is super easy. No need to edit config files or anything.
- First class mobile theme support
Mobile themes, theme overrides, and more are easily supported using segmentable useragents. Simply input the useragent patterns you want to match on (example: iphone|blackberry|android) and your cache will be segmented accordingly.
- Auto-tagging and auto-flushing when content is updated
A cache is only effective as long as there are cached items. Normally a full page cache must be flushed after changes have been made to products, categories, and cms pages. This is inefficient because changing one product can invalidate the entire cache. The full page cache supports auto-tagging and auto-flushing, so that whole cache flushes rarely ever need to be done. After you edit a product all pages associated with that product will be flushed and the others will be unaffected.
- Simple configuration
The Full Page Cache is installed as a Magento extension, and everything can be configured via a graphical user interface. Disqualify pages, add block disqualifies, include pages in the cache, and more is all done during the configuration screen (check out the demo). Most installations will never have to do anything more than enabling the cache. Everything else (hole punching, disqualifying, etc) will be done automatically!
The Full Page Extension is compatible with Magento CE 18.104.22.168 or later, and Magento Enterprise 22.214.171.124 or later. There are no other prerequisites. Log into your account at www.extendware.com and download the extension (ProperHost customers get it for free – just use the same email address that you have registered with us).
Installing the page cache extension is very simple if you follow these instructions.
Before you can download the software, you need to register an account and add your Magento Store in the Extendware Control Panel. This is necessary so that your license can be validated against your website URL. Log in and click on the Software Downloads link in the left menu under My Software. Then click Add Magento Store. Fill out the information pertaining to your store, such as Magento edition/version, URL and a name to help you identify the installation. Your store has now been associated with your Extendware account and you can proceed to download the software.
You should also prepare your Magento store for the installation by taking these steps:
- Disable system compilation in System -> Tools -> Compilation.
- Disable caching in System -> Cache Management. Select all cache types and disable them.
- Upload a file maintenance.flag to the Magento base directory. This will ensure the database is updated correctly and your users do not receive errors during the upload process.
The Full Page Cache has a dependency on the Extendware Core package, so we will install that first.
- Click on the Manage Software option in the dropdown next to your store, and then click on the Extendware Core package, followed by the Download button.
- Extract the downloaded zip archive to a folder on your computer.
- The archive contains two folders; step1 and step2. Upload the content of both files to your Magento base directory using your favorite FTP client or the cPanel File Manager. Say "Yes" to overwrite if some of the files already exist.
- Delete the maintenance.flag file so that your store is accessible again.
- Logout of the Magento Admin Panel and log back in. If you fail to do this, then you cannot configure the extension.
- You may re-enable the Magento cache. However, please refresh the cache prior to enabling it by selecting all cache types and hitting refresh.
- You may now re-enable system compilation if you want (ensure to re-run it before enabling it).
You have now successfully installed the Extendware Core package, and you should see the new Extendware option in the top menu.
We will now install the Full Page Cache extension following the same steps (1-7). Once the installation is complete, log in to your Magento Admin Panel and navigate to Extendware -> Manage Extensions -> Page Cache -> Configure and set the configuration according to the following:
Ensure the Level 1 Cache is enabled. If you have Memcached enabled for your hosting account, we recommend choosing Memcached as Cache Method. Otherwise, choose File. We use ultrafast Solid-State Drives on our servers, so the File cache is very fast. Compression should be Enabled for Memcached, and left Disabled for File cache method.
Note: Do NOT choose XCache if using our shared Magento hosting as the XCache cache method does not work in a shared environment.
Finally, save the configuration and enjoy the speed improvements of the Full Page Cache!
Magento cron job
The Extendware Full Page Cache makes use of a cron job to regularly flush stale cache entries. For this to work, the default Magento cron job must be correctly configured. For a tutorial on how to set this up in your cPanel account, please refer to https://www.properhost.com/members/knowledgebase/32/How-to-set-up-the-Magento-cron-job-or-scheduled-tasks.html.
Support and troubleshooting
If you need support or help with the installation and/or configuration of the extension, please contact Extendware directly for the best assistance. You should also read the User Guide that is provided for free with the extension.