At a glance, it seems that you are so close to the solution. So I just want to direct you in proper way.
About the event that you need to observe
---------------------------------------
Your are so confused about which magento event should observe. Everyone who works with magento development has this ambiguity in their mind for sure. So you dont have to have a feeling like "Oh God... I am trapped". :-)
Here is the scenario to find proper event. First you need to think about what should do via observer ? In this case, you need to disable cache. Next question is, when should magento processing cache ? The answer for this question is too broad and for now you should know that, magento will cache layout and blocks. So if we listen to an event which occurs after magento loading layout and blocks, then we are too late. We need to find an event which should occur before magento consider layouts.
Now if you think that you can observe to any event which happens before layout load, then you are again wrong. All of the event in magento is designed for managing different logic sides. That means purpose of each of the event in magento is different. You can alter/manage/add to that specific logic. So here comes other problem. You need to find an event which happens before loading layout and it will also allow to manage/edit/update magento cache system. This requirements leads us to `controller_action_predispatch` event.
The name of the above event says it all. It gives a clear hint that, the event is going to happen before dispatching the controller action. A controller action is the place where magento is used to load and render the layout. So at the point of magento processing this event, magento didnt touch the layout part. So our first requirement satisfies here. Now if you look on the definition of this event you can see that it holds `Mage_Core_Controller_Front_Action` instance.
#file : app/code/core/Mage/Core/Controller/Front/Action.php
Mage::dispatchEvent('controller_action_predispatch', array('controller_action' => $this));
The advantage here is, `Mage_Core_Controller_Front_Action` will allow you to get cache instance through it. This means, through an observent which listen to the above event, you have a chance to get the cache instance like this.
$cache = $this->getControllerAction()->getCacheInstance();
But here is another problem. You want to disable cache on cms pages only. But you are observing to an event which will get called for every url request `controller_action_predispatch`. If possible, we should avoid it. Thankfully, magento gives some alternative methods which will reduce the scope of our observer. ie in your case you can also observe to `controller_action_predispatch_cms`. The advantage here is, magento will process this event only when if the requested page is a cms page. So according to me, this is the best event that you can observe.
So in your `config.xml` file, you need to use this.
Changes that you need to take care of
--------------------------------------
<frontend>
<events>
<controller_action_predispatch_cms>
<observers>
<cms_page_disabler><!-- this can be anything;only need to be unique -->
<class>smashingmagazine_logproductupdate/observer</class>
<method>processPreDispatch</method>
</cms_page_disabler>
</observers>
</controller_action_predispatch_cms>
</events>
</frontend>
and your observer should be
File : `app\code\local\SmashingMagazine\LogProductUpdate\Model\Observer.php`
class SmashingMagazine_LogProductUpdate_Model_Observer
{
public function processPreDispatch(Varien_Event_Observer $observer)
{
$action = $observer->getEvent()->getFullActionName();
// Check to see if $action is a CMScontroller
if ($action == 'cms_page_view') {
$cache = Mage::app()->getCacheInstance();
// Tell Magento to 'ban' the use of FPC for this request
$cache->banUse('full_page');
}
}
}
Here two things I need to point out. File name is `Observer.php` and not `observer.php`. Second thing is we are ensuring we are going to render a cms page. `if` condition is used for that.
Finally you need to ensure the activation file of your module should exist in your application.
File : `app/etc/modules/SmashingMagazine_LogProductUpdate.xml`
<config>
<modules>
<SmashingMagazine_LogProductUpdate>
<version>0.0.1</version>
</SmashingMagazine_LogProductUpdate>
</modules>
</config>
PS : Also try to use `controller_action_predispatch_cms_page_view`. If this event is working for you, then go for it. It would be the best event for this scenario