<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>On Tap &#187; MageCache</title>
	<atom:link href="http://www.ontapecommerce.com/blog/?cat=7&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.ontapecommerce.com/blog</link>
	<description>Blog</description>
	<lastBuildDate>Wed, 19 May 2010 09:15:28 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Smart caching is king</title>
		<link>http://www.ontapecommerce.com/blog/index.php/2010/01/24/smart-caching-is-king/</link>
		<comments>http://www.ontapecommerce.com/blog/index.php/2010/01/24/smart-caching-is-king/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 20:23:47 +0000</pubDate>
		<dc:creator>Dan Garner</dc:creator>
				<category><![CDATA[MageCache]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://staging.ontapecommerce.com/blog/?p=22</guid>
		<description><![CDATA[Speed is a key factor to the success of all web sites. However, e-commerce sites bring this into smart focus. A slow web site can literally be costing you money.
Magento has come a long way in terms of performance from the early versions and improvements such as the flat catalog and compilation options have done [...]]]></description>
			<content:encoded><![CDATA[<p>Speed is a key factor to the success of all web sites. However, e-commerce sites bring this into smart focus. A slow web site can literally be costing you money.</p>
<p>Magento has come a long way in terms of performance from the early versions and improvements such as the flat catalog and compilation options have done much to improve the internal code processing speed.</p>
<p>However, it is still clear that there are two key barriers to being able to deliver a fast and scalable Magento store: hosting environment and further optimisation.</p>
<p>So I&#8217;m going to walk you through a high level view on this and introduce you to <a href="/labs/magecache">MageCache</a>, which will seriously speed up your Magento store.</p>
<h3>1. Hosting environment</h3>
<p>This is by far the most important point. With the power and flexibility that Magento gives you comes the necessity to properly resource the hosting environment. Spend too little and you&#8217;ll only be disappointed later. If you buy some $10 per month hosting somewhere, please don&#8217;t expect the site to perform very well and, of course, it probably won&#8217;t scale at all when you need it to.</p>
<p>Hardware is the first point. Whilst it is beyond this article to go into detail: don&#8217;t skimp.</p>
<p>Hosting software. Here at On Tap, we use <a href="http://nginx.org/" target="_blank">Nginx</a> as the web server component. It&#8217;s fast and it scales. Apache can&#8217;t touch it as your traffic levels get higher.</p>
<p>Environment configuration. Base installs of the key software (Nginx, MySQL, PHP, etc) won&#8217;t give you the best performance. These need to be tuned and tweaked to suit Magento hosting.</p>
<p>So what&#8217;s the ideal hosting environment? Well, that&#8217;s impossible to answer because every site is different. Key variables are not just the number of customers you expect your site to handle, but also things like the level of customisation of the Magento theme and extensions installed in Magento has an impact, and these can be vastly different from site to site.</p>
<p>However, what is clear is that flexibility is important and having a hosting environment that can flex up and down to yours needs is a real benefit to your business.</p>
<h3>2. Further optimisation</h3>
<p>So what&#8217;s next? You&#8217;ve done everything you can on the hardware and software configuration, but you still need more. So where should you go next?</p>
<p><strong>The simple answer is: caching.</strong></p>
<p>The more complete answer is a mixture of caching mechanisms to provide a smart cache.</p>
<h3>Full page caching</h3>
<p>If you are serious about your online store, then you should already be considering <a href="/magento/index/">Magento Enterprise Edition</a>. As of version 1.7 it comes with a feature called <strong>Full Page Caching</strong>, which caches the content of Magento pages for non-session customers. So this means anybody just browsing the store will get a pre-rendered version of a page.</p>
<p>This has a big speed improvement because Magento is not having to go back to the database each time to render the same page to each visitor. Once a page has been visited the first time it is stored locally and visitors requesting the same page get this from the cache instead. It&#8217;s much quicker and you&#8217;ll see an instant speed boost once you turn it on.</p>
<p>However, as soon as a customer gets a full session in Magento (i.e. adding something to the cart, logging in, comparing products, etc) the full page caching is not used for them.</p>
<h3>MageCache &#8211; serious speed-ups</h3>
<p>Normally at this point, your options finish &#8211; and certainly if you are not using Magento Enterprise Edition you don&#8217;t even have the Full Page Cache feature available to you.</p>
<p>However, at On Tap we&#8217;ve been developing our own caching engine which, importantly, is compatible with both the Community Edition and Enterprise Edition.</p>
<p><a href="/labs/magecache">MageCache</a> works on two levels. Firstly, it cache category pages for visitors. It does this for all customers &#8211; sessions or no-session. Every page of every category is cached, even different versions for different customer groups (where pricing might be different).</p>
<p><strong>Page load times are drastically reduced</strong>. Our customers&#8217; comments have ranged from: &#8220;marvellous&#8221; through &#8220;fanstastic&#8221; to &#8220;MageCache: where have you been all my life?!&#8221;</p>
<p>In some rather extreme tests, we loaded a category page containing over 400 products with the &#8216;View All&#8217; option. The theme was also heavily customised theme (lots of extra processing for each product to be rendered). With a full configured environment on better than average hardware the page still look over 30 seconds to load the HTML. Clearly unacceptable.</p>
<p>With MageCache installed, the same page loaded in &lt;1 second. And throughout sites using MageCache the page load times for categories are consistently quick.</p>
<p>However, more importantly the combination of MageCache and proper hardware/environment configuration, means that page load times are consistently fast even at high traffic levels.</p>
<h3>MageCache &#8211; full page caching</h3>
<p>MageCache&#8217;s category caching accelerates the rendering of the category block so all of the other content around it (i.e. header, left column, footer, etc) is still being rendered by Magento. And, of course, this doesn&#8217;t help product pages.</p>
<p>So that&#8217;s where MageCache&#8217;s full page cache comes into play. This has the ability to deliver fully cached pages back to each visitor where they are logged in, with sessions, or just browsing. This extends to both category and product pages.</p>
<p>MageCache delivers cached pages back to the visitor right at Magento&#8217;s &#8216;edge&#8217;, so that Magento isn&#8217;t used for page rendering. This has an immediately effect on speed.</p>
<p><strong>Page load times get seriously quick.</strong> &lt;1 second for all pages throughout the site, even on a heavily loaded server.</p>
<p>For this scenario, we call MageCache a &#8217;smart cache&#8217; because each visitor&#8217;s view on a particular product page, for example, is potentially different. For example, they might have products in their cart (so the header is different), they might have comparison products (so the left column is different), they might be a logged in user in a special customer group (so the page pricing is different). In all these cases, MageCache takes a stock cached page and modifies the output so that it appears completely customised and consistent for that particular user.</p>
<p>The result of this Smart Caching is that the load applied to Magento is significantly lowered, we&#8217;re hardly ever touching it for general usage. MageCache is handling the page rendering at a higher level, and only letting things down to Magento when needed.</p>
<h3>Smart caching really is king</h3>
<p>So with smart caching like this, really do consider the side benefits as well. Caching really helps your server &#8211; it enables pages to be loaded using less processor cycles (i.e. not having to go back to the database as often). So you are effectively increasing the value of your server because it can handle more customers simultaneously, and that is the key performance indicator for any server running an e-commerce site.</p>
<p>Enterprise Edition and MageCache actually save you money. As your business scales up and traffic levels increase you won&#8217;t have to upgrade your servers as often.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ontapecommerce.com/blog/index.php/2010/01/24/smart-caching-is-king/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
