Skip to content

Commit

Permalink
- use all the URL params to form the temporary file, in order to avoi…
Browse files Browse the repository at this point in the history
…d a wrong cached image
  • Loading branch information
steveschnepp committed May 4, 2011
1 parent e9f74c2 commit 5f68d9b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions master/_bin/munin-cgi-graph.in
Expand Up @@ -129,7 +129,7 @@ while (new CGI::Fast) {
next;
}

my $filename = get_picture_filename ($config, $dom, $host, $serv, $scale);
my $filename = get_picture_filename ($config, $dom, $host, $serv, $scale, $ENV{QUERY_STRING});

my $time = time;

Expand Down Expand Up @@ -267,10 +267,12 @@ sub get_picture_filename {
my $name = shift;
my $service = shift;
my $scale = shift;
my $params = shift;

my $cgi_tmp_dir = $config->{cgitmpdir} || "/tmp/munin-cgi-tmp";

return "$cgi_tmp_dir/$domain/$name/$service-$scale.png";
my $params = "?" . $params if $params;
return "$cgi_tmp_dir/$domain/$name/$service-$scale.png" . $params;
}


Expand Down

0 comments on commit 5f68d9b

Please sign in to comment.