In this Stackoverflow question the answer shows how to add a custom cache status: Magento Custom Caching with admin switch
Now my question is: Where is this triggered?
UPDATE: I've followed the steps as mentioned above. Now I have this code in Abstract/Service.php
final class COMP_NAME_Abstract_Service
{
static private $_instance;
private $_licenseHelpers = array();
public function clearCache( $custom = false )
{
//DO SOMETHING
}
public function getCache()
{
//DO SOMETHING
}
}
But I have to 'call' the clearCache function somewhere, but where and how?
You can use event
adminhtml_cache_refresh_type
. Add to event section in global.Add this code to observer
COMP_NAME_module_name_Model_Observer
:What do you mean by triggerd? How you write things into this new cache?
and the cache tags are used for deletion
check event application_clean_cache when clear cache like -
Mage::app()->cleanCache();
or when system saves product etc...and take a look on event - adminhtml_cache_refresh_type when clearing cache via admin panel
and your code in observer
and need add some logic to Observer, for check need refresh cache or not