Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Leland 3 posts 94 karma points
    Nov 09, 2017 @ 19:47
    Leland
    0

    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!

  • Douglas Robar 3563 posts 4597 karma points MVP 6x admin c-trib
    Nov 10, 2017 @ 11:17
    Douglas Robar
    101

    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.

Please Sign in or register to post replies

Write your reply to:

Draft