programatically clear magento cache


<?php
include $_SERVER['DOCUMENT_ROOT'].'/app/Mage.php';
Mage::app('default');

/**
clear magento cache programatically
*/
 
function clean_magento_cache(){
    Mage::app()->getCache()->clean();
    //Mage::app()->getCacheInstance()->flush();
    //Mage::app()->cleanCache();
}
clean_magento_cache();

?>

Share on Facebook




About Pragnesh Karia

Pragnesh Karia, Open Source Enthusiast, Software Professional, Software Developer, Technical Lead ,Magento, Joomla ,Joomla LMS , Moodel LMS ,PHP ,Mysql, Ajax, Javascript, Jquery, Linux, Fan of Open Sources , Annet Technologies , SEO Analyst , Mootools