Here’s a really cool, useful trick I learned from Mathieu Nayrolles’ new book Magento Site Performance Optimization, published just a couple months ago by PacktPub. While I don’t love every book from Packt, this one is a clear winner, and well worth the cost as either an ebook or paperback.
Surprisingly, by disabling some of the caches in the Magento store backend, you can actually increase the performance on the frontend. This is primarily reflected in the server response time, and I’ve seen noticeable improvements in server response time from a variety of analytics tools.
Months before reading this book, I wrote a very basic site optimization article on increasing Magento speed from the backend of the site. Consider this strategy an extension of what I wrote there, as most of that advice still holds valid. And remember not to disable the Full Page Cache, or you will have a noticeably slower Magento store.
How To Do It
Navigate to System > Cache Management in your Magento store, and simply disable the following caches:
- Collections Data (Collection data files.)
- EAV types and attributes (Entity types declaration cache.)
- Web Services Configuration (Web Services definition files (api.xml).)
- Web Services Configuration (Web Services definition files (api2.xml).)
At the end of it, you should have a screen that looks like this:
And that’s it. You’re done. Enjoy a noticeably faster Magento site.
Does This Really Work?
Sure, take a look. This first screenshot is from a Redis integration into a Magento Enterprise store.
You can clearly see a drop in the response time that Redis is tracking once those caches are disabled.
And here is it from Google Analytics. A little harder to tell, but there is a clear drop-off in the server response time after the caches are disabled.
“What about the bots?” you ask. Google Webmaster Tools crawl stats shows an even greater differences in how quickly Google itself crawls a website before and after disabling these four caches.
Look at how jagged the lines are before and after the caches are disabled. Googlebot was having a much harder, more inconsistent time crawling the website. It’s still not ideal (faster is always better), but the site is now responding faster for Google as it crawls the webnsite, and there aren’t huge spikes in the data.
All in all, disabling those four caches in Magento can provide a better experience for users and bots, which is what ecommerce and SEO are all about.
Why It Works
According to Nayrolles, this works because it takes Magento longer to check the database to see if these items are cached and then generate them if need be. By simply disabling the caches, Magento does not need to check the cache (a resource-intensive, slow process), and can just generate what it needs on the fly.
I’m not an IT guy, and I can’t say I understand in great depth why this works, but the three independent graphs really speak for themselves. Magento says it’s gotten faster, Google Analytics data gathered from users agrees, and Googlebot itself chimes in to confirm it.
So disable those caches, even for a few days or over the weekend, and see if you get the same results.