/**
  * Set cart hash in cookie on quote change
  *
  * @param Varien_Event_Observer $observer
  * @return Enterprise_PageCache_Model_Observer
  */
 public function registerQuoteChange(Varien_Event_Observer $observer)
 {
     if (!$this->isCacheEnabled()) {
         return $this;
     }
     /** @var Mage_Sales_Model_Quote */
     $quote = $observer->getEvent()->getQuote() ? $observer->getEvent()->getQuote() : $observer->getEvent()->getQuoteItem()->getQuote();
     $this->_getCookie()->setObscure(Enterprise_PageCache_Model_Cookie::COOKIE_CART, 'quote_' . $quote->getId());
     $cacheId = Enterprise_PageCache_Model_Container_Advanced_Quote::getCacheId();
     Enterprise_PageCache_Model_Cache::getCacheInstance()->remove($cacheId);
     return $this;
 }
 /**
  * Get cache identifier
  *
  * @return string
  */
 protected function _getCacheId()
 {
     return Enterprise_PageCache_Model_Container_Advanced_Quote::getCacheId();
 }
 /**
  * Retrieve cache id
  *
  * @return string
  */
 protected function _getCacheId()
 {
     return parent::_getCacheId() . $this->_getProductId();
 }
 /**
  * Check if could be applied without application
  *
  * @param string $content
  * @return bool
  */
 public function applyWithoutApp(&$content)
 {
     // check if item ids were not generated before
     $ids = $this->_getSharedParam('ids');
     if (is_null($ids)) {
         $this->_popItem();
         return false;
     }
     $result = parent::applyWithoutApp($content);
     $this->_popItem();
     return $result;
 }