In app/code/core/Mage/Adminhtml/controllers/CacheController.php you will see that flushAllAction() called (the action that is called when Flush Cache Storage clicked).
This function contains the following:
public function flushAllAction() { Mage::dispatchEvent('adminhtml_cache_flush_all'); Mage::app()->getCacheInstance()->flush(); $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__("The cache storage has been flushed.")); $this->_redirect('*/*'); }
To call this in your own file, you can do the following.
require_once('app/Mage.php'); Mage::app()->getCacheInstance()->flush();
Now you can run your php file using cronjob.
Axel
source share