Closed (fixed)
Project:
Thumb
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Aug 2009 at 05:45 UTC
Updated:
29 Aug 2009 at 12:50 UTC
Everytime thumb_path is called, a new thumbnail is generated -- severely impacting performance. It would be nice to allow the admin to specify a getting for how many days to cache the thumbnails for.
For the meantime, I popped these lines in at the top of _thumb:
// RETURN CACHED IMAGE
$realpath = $dir.'/'.$pathinfo['basename'].'.'.$pathinfo['extension'];
if(file_exists($realpath)) {
thumb_transfer($realpath);
return;
}
Comments
Comment #1
davyvdb commentedphpThumb is creating its own cache file :
$thumb->config_output_format = $pathinfo['extension'];
$thumb->config_error_die_on_error = TRUE;
$thumb->config_document_root = '';
$thumb->config_temp_directory = file_directory_temp();
$thumb->config_cache_directory = file_directory_temp() .'/cache/';
$thumb->config_cache_disable_warning = TRUE;
Maybe you need to make the cache directory writable?