Close

January 28, 2012

Magento Enterprise – FPC Craziness

So we work on Magento ecommerce solutions quite frequently. For the most basic setups, both the community and enterprise version perform like a charm. They are extremely easy to setup, configure and get rolling with Authorize.net with a basic theme overhaul. The problem is, when you start to go offroad a bit and build application ad-dons.

One trick of the trade, for very basic application addons (specialized contact forms/etc), is how to defeat (yes..Defeat) the full page cache craziness of Magento Enterprise on a single template. You would think that this would be easily done in a matter of seconds with a quick XML configuration change or maybe an ADMIN gui to prevent the underlying cache mechanism from grabbing the page (like some WordPress plugins offer). Its not. Trust us.

While we could go on how you could extend the core module and “punch through” ( see here ), we use the good old work around: “__store” get variable.

To stop a page from rendering from cache in your magento store, call it with the parameter “__store”.
ie: http://SilvaTechEcommerceTest.com/my-cool-app/?__store

Is it the best way? No, because it does not force you to add 15 xml config files (and pray you named them correctly), and then trog through the Exception.log file to see if something breaks.

Still it is a great back-door key to have when all you want is to stop caching a single simple page.