Using Cache on your Magento website

Using Cache on your Magento website

Andy Holland

Making sure that your Magento website runs quickly is very important when to comes to your business and your revenue. Slow loading sites cause visitors to quickly get frustrated and click away – never to return. It is also a SEO ranking factor and will affect where you appear on Google’s search engines results page.

There are a number of strategies you can use to increase website speed:

  • Upgrade the Server
  • Code Optimisation
  • Caching

Upgrading your server can help with website speed. It can however be less impressive than you might originally hope. This is because slow website speed is often caused by more complex problems than just hardware issues. This means that even if you do improve the server, the underlying issues are still there causing the same speed issues.

Optimising the code on your website will help the speed, but this is the most expensive solution, both time-consuming and costly.

Caching is an effective way to speed up your website. With the Magento platform, there are a number of different caching types to help speed up the site.

MySQL Query Cache

This type of caching saves the results from database query executions. It can help with app performance, but it can affect database performance negatively.

PHP Opcode Cache

PHP opcode caching will reduce the time the PHP interpreter takes to do file searches, reading and conversion to opcash. If you are using PHP 5.5.x, you should go with Zend Opcache, anything lower, try APC 3.1.13.

Remember to flush the opcode cache when you change any server code by rebooting the web server.

Magento Cache

Magento cache is important for your Magento store. This type of cache contains configuration processing results including fragmented xml files, HTML blocks and assembling layouts. It should be used all the time (except of course for staging projects and developer hosts where you don’t need these irrelevant cache displays).

Application-Side Full Page Cache

Unlike the Magento cache, this type contains the whole page HTML code, boosting any query processing and displaying results to users without generating the page.

Full page cache is remarkably effective at speeding up processing by a fair number of milliseconds per query. If you are looking for effective static page caching, this will help, however, this type of cache doesn’t work with dynamic page content. As an example, your Magento store shopping basket changes with each item added or removed. The page could end up showing irrelevant data – highly frustrating for the user. To combat this, cache tools with support for any dynamic blocks have been created, with a marker added to the HTML which replaces the information with dynamic content.

Server-Side Full Page Cache

Another option is caching code server-side which Magento passing on query processing results. The server integrates with Magento to ensure cache relevancy and to control any dynamic blocks. Using Varnish and integration modules, this can speed up processing. However, the speed is dependent on the integration module performance.

Will Full Page Caching Help Speed Up my Site?

If you have trouble with speed, caching will help, but likewise, be aware that other issues may be at play, including data from third party servers such as Facebook incorporated into your site through widgets could be having a detrimental effect.

If you’d like help with your Magento site speeds, or if you have any other query, please get in touch with us today.

 

 

 

 

Andy Holland

Author Andy Holland

More posts by Andy Holland