Added Parameter to get cache filename -> very slow!

Post here if you have any problems using phpThumb

Added Parameter to get cache filename -> very slow!

Postby BennyBorn » Fri Jan 02, 2009 6:49 am

Hey Folks,

first of all, phpThumb is a great tool <3
I'm using ur tool very often on my website (http://gigafoundation.de). For my purposes
I added a new parameter called "getPath". This should return the path of the cached
file instead of showing or redirecting the cached file.

In the function RedirectToCachedFile() I added an if clause like this
Code: Select all
if( isset($_GET['getPath']) ) {
echo $phpThumb->cache_filename;
die();
}


For sure, this works but it's veeeeeeeryyy slow. When redirecting to the cached image it
goes in microseconds without any CPU usage or so, but when I try to return the path
of the cachefile my CPU runs up to 60% percent - every time (!)

Any suggestions how to fix that?
BennyBorn
 
Posts: 2
Joined: Fri Jan 02, 2009 6:37 am

Re: Added Parameter to get cache filename -> very slow!

Postby kkevilus » Mon Mar 08, 2010 7:14 pm

I ran across a similar problem using Wordpress because it's running a loop within a loop.

Had one host kick me off their servers, and shut down a site during major press-release.

Embarrassing.
kkevilus
 
Posts: 4
Joined: Thu Aug 27, 2009 7:52 pm


Return to Support

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron