Zen Cart Logo
Forums / General Questions / CRON job to delete cache files

CRON job to delete cache files

Locked

Views: 2,978

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
18 Nov 2008, 2:50 PM
#1
zeroca avatar

zeroca

New Zenner

Join Date:
Oct 2007
Posts:
31
Plugin Contributions:
0

CRON job to delete cache files

My host says I have to many inodes. It looks like the culprit is my cache file. Does anyone know how a CRON job to delete the query_selects----------.txt files should be written. I have other modules that put there files in a sub-folder of the cache folder, so I only want to delete the .txt files in the main folder, but I cant seem to get it working.

TIA

18 Nov 2008, 2:56 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: CRON job to delete cache files

The first thing you need to do is turn off the query logging that's generating all those files! That's a debug feature that should never be enabled on a live shop!
http://www.zen-cart.com/forum/showthread.php?p=617876#post617876

Second, you can use the utility/code I posted in one of the "similar threads" discussions from the list at the bottom of this page.
I've included it here for convenience: http://www.zen-cart.com/forum/showthread.php?t=107669 You may want to adapt it to also include *.txt files as well as the *.log and *.sql files it currently cleans up.

19 Nov 2008, 4:56 AM
#3
zeroca avatar

zeroca

New Zenner

Join Date:
Oct 2007
Posts:
31
Plugin Contributions:
0

Re: CRON job to delete cache files

Thanks a million Doc. That did the trick perfectly!