I upgraded to zenphoto 1.1.3 yesterday and I like most of the new improvements. However, I have a problem with the behavior of the preload script. When I go to any preload page it loads everything as it should, however it always starts over by clearing out the cache folder completely. I looked at the script and the line `$gallery->clearCache(SERVERCACHE . '/' . $folder); // clean out what was there` does this. Why would this be added? I can't imagine a more counter productive line. The trac revision that added this was
http://www.zenphoto.org/trac/changeset/764 . For my use, I often add images to albums, and just want to update the cache for those, not recreate every image. I consider my server pretty fast, but it still takes a long time to load thumbnails and medium images for hundreds of images at once (I've got 14,116 pictures total) so any less work it has to do is great. Please consider removing this line or perhaps adding a link on the edit album page to clear the cache, not to do it by default. Thanks.
Comments
I agree with him. Don't clear the cache before pre-loading the album, that way images that are already loaded aren't re-processed.
There are some caveats with not clearing the cache. You can have stale images in it. This is specially true for watermarking, but can also happen if you upload a new version of the same image.
Anyway, as of tonights nightly build there will be an option as to whether to clear the cache or not when you are pre-caching images. Use at your own risk.