Question

You can obviously manually flush the catalog images cache by going to Cache management and clicking on "Flush Catalog Images Cache". My question is can this be set as a scheduled task? If so, what would the code be to create this and what file would it be inserted into?

The below extension looks like it will do what I'm after and a bit more, so will possibly just go with that unless there are any suggestions of a better way to do?

http://www.magentocommerce.com/magento-connect/cron-cache-cleaner-3782.html

Was it helpful?

Solution

Try using Fabrizio Branca's automatic cache cleaning extension. You can clear any of your cache's using a cron expression that you can set for each of the caches. Just make life simpler ;)

http://www.fabrizio-branca.de/magento-automatic-cache-cleaner.html

OTHER TIPS

Essentially this will do it for you

Mage :: getModel( 'catalog/product_image' ) -> clearCache();

so you can create a php file including this which you add to your cron jobs (see - https://stackoverflow.com/questions/5460165/how-to-clean-magento-cache - for more info). Alternatively if what you need to delete is limited to product images for example you can delete the contents of the appropriate cache folder (i.e. media/catalog/product/cache). Again you can cron this job as a batch file or use php exec.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top