I use phpThumb on a client website, and since it is a very heavy image application, the cache becomes very fast. Today, my thumbs stopped working, and I renamed the cache folder as the folder was too large to be deleted via ftp. I renamed it cache_old and am now trying to delete it via ssh. I recreated the cache folder and everything worked fine again.
Since it seems to stop working when the cache folder is too full, and also just to maintain order on the server, I would like to set up a daily cron job to clear files from the cache folder. I have no idea how to do this, although I still could not find the answer.
The cache folder has a file called index.php, which I assume should remain, plus a subfolder named source, which again has the index.php file, again I assumed that it should be there. So I need a command that will delete everything, BUT these files.
Any recommendations on how to fix this will be appreciated!
Thanks Christina
PS The site is hosted on DreamHost, and I installed other jobs through the cronjob panel, and I have SSH access, if it's easier to configure it this way. Hooray!!
source
share