Closed (fixed)
Project:
ImageCache
Version:
5.x-2.0-beta
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2008 at 22:23 UTC
Updated:
1 Feb 2008 at 08:51 UTC
When using ImageCache with private files, _imagecache_cache() is invoked for all generated images, even though the generated file already exists.
_imagecache_cache() generates a lock file. This is a somewhat expensive an unnecessary operation.
I suggest checking for the presence of $dst as early as possible, possible even before the is_file($src) check (unless you want to prevent access to generated files after the source image has been deleted), and only use a lock file when generating images.
Comments
Comment #1
dopry commentedthe lock file should only be used when generating images... looking at _imagecache_cache and imagecache_cache_private... It seems like imagecache_cache_private should be checking for dst before calling _imagecache_cache.... before private files I was depending on apache to do this... Do you have time to roll a patch?
Comment #2
dopry commentednm this should be fixed in head...
Comment #3
dopry commentedComment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.