Skip to content

Commit

Permalink
fix message 'One or more of the Cache Types are invalidated: Blocks H…
Browse files Browse the repository at this point in the history
…TML output.'
  • Loading branch information
tangar76 committed Mar 3, 2017
1 parent 4fdb4fa commit 8f00eba
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/code/community/TM/Core/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,17 @@ public function onBeforeRenderLayout()
$layout->getBlock('content')->append($debug);
}
}

/**
* Refreshes block cache after saving the product. Fix message:
* "One or more of the Cache Types are invalidated: Blocks HTML output."
*
* @param Varien_Event_Observer $observer
*/
public function updateInvalidatedBlockHtmlCache($observer)
{
Mage::app()->getCacheInstance()
->cleanType(Mage_Core_Block_Abstract::CACHE_GROUP);
}

}
8 changes: 8 additions & 0 deletions app/code/community/TM/Core/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@
</tmcore>
</observers>
</controller_action_predispatch>
<catalog_product_save_commit_after>
<observers>
<tmcore>
<class>tmcore/observer</class>
<method>updateInvalidatedBlockHtmlCache</method>
</tmcore>
</observers>
</catalog_product_save_commit_after>
</events>
<translate>
<modules>
Expand Down

0 comments on commit 8f00eba

Please sign in to comment.