Created
February 5, 2016 10:40
-
-
Save Webmasterei/e7271902769dd07f36dc to your computer and use it in GitHub Desktop.
Script to delete Magento Cache that is older than...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
MAGENTOROOT="htdocs" | |
### Delete Frontpage Cache that is older than one day. ### | |
find $MAGENTOROOT/var/cache/fpc* -type f -mmin +3600 -exec rm {} \; | |
### Delete Magento Caches that are older than 120min ### | |
find $MAGENTOROOT/var/cache/mage* -type f -mmin +120 -exec rm {} \; | |
#### Delete repotrts older than 7 days ### | |
find $MAGENTOROOT/var/report/ -mtime +7 -exec rm -f {} \; | |
#### Delete session data (should be the same time as session cookie time) ### | |
find $MAGENTOROOT/var/report/ -mmin +120 -exec rm -f {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment