Alternative to Apache htcacheclean for mod_disk_cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We put this in our cron job to run once a day and it's working great.  

It deletes all files and directories which haven't been modified in 30 days.  We didn't use access time "-atime" to determine which
files to delete because for performance reasons, we disabled atime on the file system.  A disadvantage of this method is that it
doesn't keep cache size under a certain size (htcacheclean does).  It does have the advantage of keeping the cached content fresh,
is much faster, and seems less resource intensive.  We found that our cache size is pretty stable at about 2 to 4 GB (we average 8MM
hits/month) so we like this better.

root /usr/bin/find /var/httpd/proxy/* -type f -mtime +30 -exec rm -rf {} \;

Remember to change the "/var/httpd/proxy/*" directory to point to wherever your cache is.

Happy Web Serving,

Geoff Millikan
http://www.t1shopper.com/




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux