/**
  * Check when cache should be disabled
  *
  * @param Varien_Event_Observer $observer
  * @return Enterprise_PageCache_Model_Observer
  */
 public function processPreDispatch(Varien_Event_Observer $observer)
 {
     if (!$this->isCacheEnabled()) {
         return $this;
     }
     $action = $observer->getEvent()->getControllerAction();
     /* @var $request Mage_Core_Controller_Request_Http */
     $request = $action->getRequest();
     $noCache = $this->_getCookie()->get(Enterprise_PageCache_Model_Processor::NO_CACHE_COOKIE);
     if ($noCache) {
         Mage::getSingleton('catalog/session')->setParamsMemorizeDisabled(false);
         $this->_getCookie()->renew(Enterprise_PageCache_Model_Processor::NO_CACHE_COOKIE);
     } elseif ($action) {
         Mage::getSingleton('catalog/session')->setParamsMemorizeDisabled(true);
     }
     /**
      * Check if request will be cached
      */
     if ($this->_processor->canProcessRequest($request) && $this->_processor->getRequestProcessor($request)) {
         Mage::app()->getCacheInstance()->banUse(Mage_Core_Block_Abstract::CACHE_GROUP);
         // disable blocks cache
     }
     $this->_getCookie()->updateCustomerCookies();
     return $this;
 }
 /**
  * Check when cache should be disabled
  *
  * @param Varien_Event_Observer $observer
  * @return Enterprise_PageCache_Model_Observer
  */
 public function processPreDispatch(Varien_Event_Observer $observer)
 {
     if (!$this->isCacheEnabled()) {
         return $this;
     }
     $action = $observer->getEvent()->getControllerAction();
     /* @var $request Mage_Core_Controller_Request_Http */
     $request = $action->getRequest();
     $noCache = $this->_getCookie()->get(Enterprise_PageCache_Model_Processor::NO_CACHE_COOKIE);
     if ($noCache) {
         Mage::getSingleton('catalog/session')->setParamsMemorizeDisabled(false);
         $this->_getCookie()->renew(Enterprise_PageCache_Model_Processor::NO_CACHE_COOKIE);
     } elseif ($action) {
         Mage::getSingleton('catalog/session')->setParamsMemorizeDisabled(true);
     }
     /**
      * Check if request will be cached
      * canProcessRequest checks is theoretically possible to cache page
      * getRequestProcessor check is page have full page cache processor
      * isStraight works for partially cached pages where getRequestProcessor doesn't work
      * (not all holes are filled by content)
      */
     if ($this->_processor->canProcessRequest($request) && ($request->isStraight() || $this->_processor->getRequestProcessor($request))) {
         Mage::app()->getCacheInstance()->banUse(Mage_Core_Block_Abstract::CACHE_GROUP);
     }
     $this->_getCookie()->updateCustomerCookies();
     return $this;
 }