I need to flush only block HTML of Magento 1,9
If I write
try {
Mage::app()->getCacheInstance()->cleanType('block_html');
} catch (Exception $e) {
die("[ERROR:" . $e->getMessage() . "]" . PHP_EOL);
}
It's correct?
I need to flush only block HTML of Magento 1,9
If I write
try {
Mage::app()->getCacheInstance()->cleanType('block_html');
} catch (Exception $e) {
die("[ERROR:" . $e->getMessage() . "]" . PHP_EOL);
}
It's correct?
If you have **Magerun n98 installed, you can do this from SSH.
All commands try to detect the current Magento root directory. If you have multiple Magento installations you must change your working directory to the preferred installation.
To view the status of the cache, enter:
php n98-magerun.phar cache:status
You can flush specific type of cache by entering:
php n98-magerun.phar cache:flush [type] ... [type]
In your case:
php n98-magerun.phar cache:flush block_html
Also, you can run this command if you don't have Magerun:
php -r 'require "app/Mage.php"; Mage::app()->getCacheInstance()->flush(block_html);'
Mage::app()->getCacheInstance()->cleanType(Mage_Core_Block_Abstract::CACHE_GROUP);
Where Mage_Core_Block_Abstract::CACHE_GROUP is block_html
you can pass different type of cache also, like