picture_clones(); $fileshortcode = strtolower(trim($func->stripHtml($_REQUEST['s']))); $requested_uri = urlencode(basename($_SERVER['REQUEST_URI'])); $cache_file = "$picpath/$fileshortcode"; $browser_cache = 31536000; //echo "cache_file=$cache_file
"; /* Use the resolution value as a path variable and check to see if an image of the same name exists at that path */ if (is_file($cache_file) && file_exists($cache_file) && is_readable($cache_file) && filesize($cache_file) >10 ) { // it exists cached at that size // echo "HIT cache_file=$cache_file
"; //if ($watch_cache) { // if cache watching is enabled, compare cache and source modified dates to ensure the cache isn't stale // $cache_file = $imgSrc->refreshCache($source_file, $cache_file, $resolution, $picQuality ); //} $imgSrc->sendImage($cache_file, $browser_cache); exit(0); } //echo "HOT A MISS cache_file=$cache_file
"; //echo "$source_file, $cache_file"; /* It exists as a source file, and it doesn't exist cached - lets make one: */ //echo "generateImage($source_file, $cache_file, $resolution, $picQuality )"; $file = $imgSrc->generateImage($source_file, $cache_file, $resolution, $picQuality ); $imgSrc->sendImage($file, $browser_cache); exit(0); ?>