From: Chris W. <cwi...@wi...> - 2004-02-05 04:12:20
|
that's okay by me. I will, however, take the opportunity to vent about the int(100000*rand) snippet. wouldn't it be more coherent to just append time() to the url (if the intent is to obfuscate the browser cache?). If time doesn't give enough precision, we could use Time::Hires. One of the inherent attributes of rand is that it isn't guaranteed unique. Obviously, it's an incredibly low probability that the dup would hit (with a mostly annoying/confusing result if it did), but as vigilant programmers, we're supposed to shoot those kind of booby traps. Chris. On Feb 4, 2004, at 9:20 PM, Bruce Winter wrote: >> I dug through the http debug while painting the weather_graph, and >> have >> made some progress. >> It looks like I can resolve issue number 2 by adding >> html_alias_weather_graph=$config_parms{data_dir}/rrd >> to my local ini file. should that be in the global ini file? > > I that we wouldn't need a default mh.ini file for that html_alias, > since I > saw that Dominique had this in the Reload section of weaterh_graph.pl: > > $config_parms{weather_graph_dir} = "$config_parms{data_dir}/rrd" > unless > $config_parms{weather_graph_dir}; > > but after seeing your post (and seeing that I also had that parm set > in my > .ini file), I see now that the alias code is processed BEFORE the user > code, > so that default will not work. > > Rather than require a new mh.ini parm, hows about we change the code in > web/bin/weather_graph.pl from this: > > $html .= "\'/weather_graph/weather_" . $typegraph . "_" . > $periodgraph->[0] . ".png?" . int(100000*rand); > > to this: > > $html .= "\'/data/rrd/weather_" . $typegraph . "_" . > $periodgraph->[0] . > ".png?" . int(100000*rand); > > That will then leverage this exsisting alias that enables the web > browser to > get at data files: > > html_alias_data = $config_parms{data_dir} > > > Bruce > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > ________________________________________________________ > To unsubscribe from this list, go to: > http://sourceforge.net/mail/?group_id=1365 > |