In the Magento admin under Cache Management, what does it mean when it shows a cache as invalidated? How does Magento know a cache is invalidated? In particular, I\'m wonderin
The @Magento Guy answer is correct, but I think this solution below can help you on refreshing just the invalidated caches on Magento.
I use Bitnami Magento Stack, for me this solution below was the best I have found.
I've tried to create a Mage_Shell_Class php file, but without success (invalid cache array were always empty when it runs, no matter what, and I really don't imagine why).
I've created a php file 'sample.php':
getCacheInstance()->getInvalidatedTypes();
foreach($invalid as $i)
{
Mage::app()->getCacheInstance()->cleanType($i["id"]);
}
I've placed it on magento root folder, and to start it I use a cronjob that runs under root user.
So, to create the cronjob on the root user:
sudo crontab -u root -e
And this was my command line to run it:
* * * * * . /opt/bitnami/scripts/setenv.sh ; /opt/bitnami/php/bin/php /opt/bitnami/apps/magento/htdocs/sample.php >> /var/log/cron/cron.log 2>&1
Some parts on this line are very particular to my problem:
Probably you need to change the cron line command, but I think this will help you.