use CGI::SpeedyCGI qw/:standard -no_xhtml/;
use CGI qw/:standard -no_xhtml/;
use POSIX;
+use MD5;
sub fail ($) {
print(header(-status=>500),
my $end= $g->{TimeRanges}[$sloth];
die unless defined $end;
- my $cacheid= "$section!$group!$elem!$sloth!$width!$height";
- my $cachepath= "cache/$cacheid.png";
-
my @args= @{ $g->{Args} };
s,\<interval/(\d+)\>, $end/$1 ,ge foreach @args;
unshift @args, qw(--end now --start), "end-${end}s";
unshift @args, '-t', $title, '-w',$width, '-h',$height;
unshift @args, qw(-a PNG --full-size-mode);
+ my $cacheid= "$section!$group!$elem!$sloth!$width!$height!";
+ $cacheid .= unpack "H*", MD5->hash(join '\0', @args);
+ my $cachepath= "cache/$cacheid.png";
+
if (param('debug')) {
print((join "\n",@args),"\n"); exit 0;
}