RM a common error by most web developers

The most common error I find with most web developers is not to implements several crons for RM for their cache once a day, on a windows machine this would be DEL as a scheduled task on the cache folder.

It is simple, say your cache is at the path of /home/webuser/xoops_data/cache/xoops_cache as well as /home/webuser/xoops_data/cache/smarty_compile and also /home/webuser/xoops_data/cache/smarty_cache, you would then have 3 RM if your running linux cron jobs to run, either in the shell type:-

$ sudo crontab -e

or in the cronjob section of your website add a cron job for once a day which would be

1 4 */1 * * rm -f /home/webuser/xoops_data/cache/xoops_cache/*
1 4 */1 * * rm -f /home/webuser/xoops_data/cache/smarty_compile/*
1 4 */1 * * rm -f /home/webuser/xoops_data/cache/smarty_cache/*

This will drop the cache daily with a cron around 4:01am every early morning for the server, you might want to do this around your least busiest time on the system but 4am is normally this.

In Linux you could also run a single one for the following command:

1 4 */1 * * rm -f /home/webuser/xoops_data/cache/*/*