2

How can storage cache be cleaned programaticaly, I have found an answer [https://stackoverflow.com/questions/15028159/magento-flush-cache-storage][1] but this solution does not work.After I run it get this type of error (Parse error: syntax error, unexpected 'public' (T_PUBLIC) in ..\file.php on line 6).

Is there any other solution for flushing storage cache

3

Create a file called flush.php with the following content:

<?php
require_once('app/Mage.php');
Mage::app()->getCacheInstance()->flush();
?>

and save it in your Magento root folder. Then run it any way you want, from the browser with http://yoursite.org/flush.php, with a cron or via CLI.

2

You have to use below code for flush cache storage

define('MAGENTOROOT', realpath(dirname(__FILE__)));

require_once(MAGENTOROOT.'/app/Mage.php');

Mage::app()->cleanCache();

flush();

OR

Mage::app()->cleanCache();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.