CoonDog This is a unique situation. Site died 10 years ago, only 1 or 2 people a month come to site. In any given month maybe 10 gallery pages are loaded. Some of these gallery pages probably wont be loaded again in our lifetime. Figured the server could resize 5000 images a month instead of having 250,000 thumbs that will never get accessed. Gallery has been live for 4 days and not one visit or populated thumbnail.
Basically your solution to delete cache daily, is to save storage space? It will cause more processing and slower loading times, but if this is better in your case, then yes of course it can be done. But then, why not just disable cache in the first place? Creating cache, with such few visitors, just to delete it the same day, surely serves no purpose? The odd visitor will have to wait for the resized image to get created, and its pointless to cache it for other visitors that have to view it on the same day. Besides, for one visitor, resized images will cache in browser.
Disabling cache should work fine if your images are reasonable dimensions (it seems they are) and the server has reasonable resources (cpu).
Another option, is to disable image resizing entirely, but this depends on the average dimensions and file size of your original images. If your original images are not too big, they can be loaded as thumbnails. No cache, no resizing, problem solved. If lots of your images are >2000 px, it would consume too much memory and bandwidth to load them as thumbnails.
A 3rd option, you could consider very high compression (lower quality) like 50, and I think you could squeeze 250.000 resized images into less than 3GB. Just thinking aloud.
CoonDog "probably only 5 at any given time." Only 5 gallery pages loaded a week. So only have to delete 5 cache folders a week.
In my opinion, it then seems pointless with cache in the first place, because nobody will be able to take advantage of it. The only time cache will come into play, is if at least two different visitors visit the same album on the same day, where the first visitor has caused the images in that album to get cached. I would just disable cache.
Amazing! Cool that you have kept the archives up that long.