如何在magento中刷新特定产品的整页缓存

如何在magento中刷新特定产品的整页缓存,magento,lesti-fpc,Magento,Lesti Fpc,目前我正在使用lesti fpc进行缓存。现在我想刷新一些特定的产品缓存,它们的库存直接在数据库中更新 我发现了这个。但我不知道怎么用这个 $this->_getFpc()->clean(sha1('product_' . $item->getProductId())); 您可以在CRON或脚本中使用LESTI,如下所示: $productId = 'yourproductidhere'; $lesti = Mage::getSingleton('fpc/fpc'); $c

目前我正在使用lesti fpc进行缓存。现在我想刷新一些特定的产品缓存,它们的库存直接在数据库中更新

我发现了这个。但我不知道怎么用这个

$this->_getFpc()->clean(sha1('product_' . $item->getProductId()));

您可以在CRON或脚本中使用LESTI,如下所示:

$productId = 'yourproductidhere';

$lesti = Mage::getSingleton('fpc/fpc');
$clean = $lesti->clean(sha1('product_' . $productId));
对于CMS块

$blockIdentifier = 'blockidentifierhere'
$lesti->clean(sha1('cmsblock_' . $blockIdentifier));
用于CMS页面

$pageIdentifier = 'pageidentifierhere';
$lesti->clean(sha1('cms_' . $pageIdentifier));
类别

$categoryid = 'yourcategoryidhere';
$lesti->clean(sha1('category_' . $categoryid));