diff --git a/app/code/community/Lesti/Fpc/Model/Fpc.php b/app/code/community/Lesti/Fpc/Model/Fpc.php index cf7bfd5..b5f7e28 100644 --- a/app/code/community/Lesti/Fpc/Model/Fpc.php +++ b/app/code/community/Lesti/Fpc/Model/Fpc.php @@ -76,6 +76,21 @@ public function save($data, $id, $tags=array(), $lifeTime=null) if ($lifeTime === null) { $lifeTime = (int) $this->getFrontend()->getOption('lifetime'); } + // edit cached object + $cacheData = new Varien_Object(); + $cacheData->setCachedata($data); + $cacheData->setCacheId($id); + $cacheData->setTags($tags); + $cacheData->setLifeTime($lifeTime); + Mage::dispatchEvent( + 'fpc_save_data_before', + array('cache_data' => $cacheData) + ); + $data = $cacheData->getCachedata(); + $id = $cacheData->getCacheId(); + $tags = $cacheData->getTags(); + $lifeTime = $cacheData->getLifeTime(); + return $this->_frontend->save( (string)$data, $this->_id($id),