I am looking into pruning our cached images created from ImageGen. I can see the last accessed time on each image, so I was thinking I could write a Powershell script to prune images that have not been accessed for >6 months or so. I am wondering how index.html comes into play for ImageGen though. If I remove a file from /media/xxxx/cached do I also need to remove from index.html?
Also, is there a better way to achieve this other than a Powershell script as mentioned above?
No problem at all deleting old files from the 'cached' folders. Ideally you'd remove the entry from the index.xml file (to keep the index.xml file size and thus memory usage at its absolute lowest) but there's no problem with ImageGen to have references to files that no longer exist... it'll just make the cached image again if a request comes in.
There's no utility for pruning the index.xml file and cached folder, though that would be a nice tool.
If the bulk of your cached images are no longer needed you could entirely delete the 'cached' folder(s) completely and ImageGen will create new cached files (and index.xml) when requests for resized images come in from website visitors.
Removing old cached images
Hello,
I am looking into pruning our cached images created from ImageGen. I can see the last accessed time on each image, so I was thinking I could write a Powershell script to prune images that have not been accessed for >6 months or so. I am wondering how index.html comes into play for ImageGen though. If I remove a file from /media/xxxx/cached do I also need to remove from index.html?
Also, is there a better way to achieve this other than a Powershell script as mentioned above?
Thanks for your time!
Hi, Leland,
No problem at all deleting old files from the 'cached' folders. Ideally you'd remove the entry from the index.xml file (to keep the index.xml file size and thus memory usage at its absolute lowest) but there's no problem with ImageGen to have references to files that no longer exist... it'll just make the cached image again if a request comes in.
There's no utility for pruning the index.xml file and cached folder, though that would be a nice tool.
If the bulk of your cached images are no longer needed you could entirely delete the 'cached' folder(s) completely and ImageGen will create new cached files (and index.xml) when requests for resized images come in from website visitors.
cheers,
doug.
is working on a reply...