Clearing My Image Caches
Posted: Thu Mar 10, 2005 11:38 am
I've been working on a photo album because...well because I was bored. I wrote a forum and a blog already, well kinda, once I get things like 80% done I normally lose interest, but I thought this was the next thing that would be fun to play with.
Well I spend some time yesterday doing it and got it to how I wanted it, almost. I need to add so people can upload their own images, but that will be easy, my real problem is that to increase speed and save on some processing power I save the thumbnails I generate. I name them the md5 value of the md5 value of the thumbnail script and the original image file so that if the script or image changed, it knows to create a new thumbnail.
As you may have already figured out, my problem is that the old images aren't deleted ever. I'm not really sure how I can go about clearing the unused thumbnails because I would need to know the orignal md5 information of the thumbnail.php script and the image. I think I'd be able to solve this if I used a mysql database to store the md5 information, but I was hoping that wasn't necessary.
Any ideas?
All my images are in the "test2" album. You have to click that to view it.
http://www.swigg.net:2222/photoalbum/
Well I spend some time yesterday doing it and got it to how I wanted it, almost. I need to add so people can upload their own images, but that will be easy, my real problem is that to increase speed and save on some processing power I save the thumbnails I generate. I name them the md5 value of the md5 value of the thumbnail script and the original image file so that if the script or image changed, it knows to create a new thumbnail.
As you may have already figured out, my problem is that the old images aren't deleted ever. I'm not really sure how I can go about clearing the unused thumbnails because I would need to know the orignal md5 information of the thumbnail.php script and the image. I think I'd be able to solve this if I used a mysql database to store the md5 information, but I was hoping that wasn't necessary.
Any ideas?
All my images are in the "test2" album. You have to click that to view it.
http://www.swigg.net:2222/photoalbum/