Hello,
I did not understand the logic of the image cache.
In the case of a high-traffic gallery, the image cache is used once for storage space and, in addition, server load is produced.
If I understood correctly, the resize images and thumbnails are also generated by the server (if not present) when search robots make a web page request (or somebody). So, on average, all resize and thumbs are in cache anyway. Deleting them after a certain time only increases the server load.
Honestly. How often does a user change the size of resize images and thumbnails? With me: only once.
In my gallery the original images (in / albums) and the resize images are to be protected from hotlinking and these image files are not indexed by searchrobots (the text of the image pages already). But, it should allow the thumbnails of searchrobots to be indexed. (only thumbs: bing and google image search indexing allowed. All images: hotlinking disallow). In the logic with the image chache this becomes very difficult.
It would at least be an advantage if the resizes and thumbs were stored in different folders. Even better would be if they were stored in the same folder structure (not in the same folder) as the original image files. Example resize max-width / max-height 800 = parent folder "/800" or "/resize". Thumbs size 150 = parent folder "/150" or "/thumbs". Saving in the same folder structure also saves the renaming of file names, what makes it even better. All resize and thumbs together in a single folder is unwieldy.
I do not understand the benefit of image cache.