PHP doesn't provide a way to schedule and run jobs in the background. So, to do what you're asking for, I would have to wait until a visitor came to the page, and then run the deletion while they are waiting for their page. That didn't seem like a wise feature to put into a product that is supposed to IMPROVE website performanceCue4cheap wrote:budgetneon,
Would it be possible to have it just delete the expired cache files? I looked at the admin side and it said it had 1,xxx expired files. Seems like a bit of extra space that just should go away versus staying around if they are expired. (I deleted them without writing down the exact amount of files or the space it was taking).
Thank you,
Mike
Most hosts allow you to schedule your own jobs...there's probably a Cpanel control for "cron". Add a job like the following, and have it run twice a day or so:
find /opencart/root/dir/system/cache/pagecache -type f -cmin 300 -exec rm -f {} \;
That finds any files in the cache directory and deletes them if they are over 300 minutes ( 5 hours ) old.