protected function _saveCache($data, $id, $tags = array(), $lifetime = null) { // Let's add a tag for quick and easy clean convenience. $customer = Mage::getSingleton('customer/session')->getCustomer(); if ($customer->getId()) { // Do not save anything. return $this; } return parent::_saveCache($data, $id, $tags, $lifetime); }
protected function _saveCache($data, $id, $tags = array(), $lifetime = null) { // Let's add a tag for quick and easy clean convenience. $customer = Mage::getSingleton('customer/session')->getCustomer(); if ($customer->getId()) { // Let's add the customer's model tags also, so updating the customer flushes. $modelTags = $customer->getCacheIdTags(); if ($modelTags) { $tags = array_merge($tags, $modelTags); } $tags[] = $this->getCacheCustomerTag($customer); } return parent::_saveCache($data, $id, $tags, $lifetime); }