using hook to clear cache in magento