I need to flush only block HTML of Magento 1,9

If I write

try {


 } catch (Exception $e) {
        die("[ERROR:" . $e->getMessage() . "]" . PHP_EOL);

It's correct?

  • Accept the answer If you find it helpful – Keyur Shah Jan 25 '18 at 17:35

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);'

Where Mage_Core_Block_Abstract::CACHE_GROUP is block_html you can pass different type of cache also, like

  • block_html
  • collections
  • config
  • layout
  • translate
  • eav
  • config_api
  • config_api2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.