News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Best practice to prune new image cache?

Started by BigMike, March 08, 2019, 05:29:11 PM

Previous topic - Next topic

BigMike

Hello SMF,

I recently upgraded our forum and am now using HTTPS + Image Cache feature. Using the default settings, after about a week our /cache/images folder now has nearly 20 GB (our forum size is 1.1 million posts, 23k members). We have tens of hundreds of large cached files (between 1 MB and 8 MB) so I've reduced the value for maximum file size to cache to 1028 KB and am wondering if I can just wipe out (empty) the entire cache/images folder save for index.php and let things re-cache now with the lower image size value?

I spent time searching for an answer on this so sorry if this has already been answered. The Wiki doesn't provide any details.

Moving forward, what is the best practice here? Empty the folder monthly or so? Thanks

Regards,
BigMike

LiroyvH

((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

BigMike

Quote from: CoreISP on March 08, 2019, 05:37:30 PMhttps://github.com/sbulen/sjrbTools/blob/master/proxy-maint-cron.php

Thank you Liroy, that worked excellent! I've configured it as a cron task that runs before the server creates nightly backups :)

Quote
Stats...
Total files:   58754   Size:   18567869820
Total kept:   2291   Size:   499999984
Total deleted:   56463   Size:   18067869836

Regards,
BigMike

Advertisement: