I have a store with over 80K products. I have used Lesti_fpc to enhance its performance. I add and remove products from the store using magmi. The products are provided by various vendors in the form of xml. Thus we directly change product stock in the database using magmi. I want to clear the cache of those products whose stock is zero in the xml file. I am calling the following function in the magmi script. I have included the save.php file of fpc in our script. then created an object of the class Lesti_Fpc_Model_Observer_Save in our script, and called a custom function (which I have created in this class) the function is as below.
public function clearProductCache($productId = null)
{
//$this->_getFpc()->clean(sha1('product_' . $productId));
$this->_getFpc()->clean($productId);
die('test');
}
this function executes but the cache does not clear. Any help is appreciated.
This should works in your case. Change 1000012 by your Product Id.