On Tue, Dec 06, 2005 at 04:28:30PM -0500, Ricker, William wrote: > (a) <img href="../graphs/123456789.png"> > Generate the graph to a 2nd file named with a random number (for > security) or a serial number (if no security needed)
> (b) <img > href="/scripts/imagemaker?x=17&y=42&title=%22Foo%20Bar%22&xname=X&yname= > Y"> > Put the code that decides what to do from the Request in a module, and > call it from both the CGI or action module that generates the HTML page > (which generates the <img> link) and the CGI or action module that > generates the dynamic graphic (in response to the <img> link). > B has efficiency advantages if the pages will be fetched through Akamai > or client proxies, and multiple users may request the same image -- so > the image will be cached outside your server -- dont' recreate it if you > don't have to; this doesn't apply if everyone is local or every request > is unique. You don't have to recreate the image with A, if you cache it on the server. What I do is build a string containing the gnuplot commands, and use an MD5 hash of that string in the image filename. I keep the image file around for a couple hours, and if another request results in the same gnuplot commands, I just skip the call out to gnuplot. Ronald _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

