add (for real) hash on filter_counter for cache_name

This commit is contained in:
Sims24 2017-05-23 18:00:50 +02:00
parent 9a07a065a1
commit c2940da572
2 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ sub manage_selection {
$self->{cache_name} = "cache_varnish_" . $self->{mode} . '_' .
(defined($self->{option_results}->{hostname}) ? md5_hex($self->{option_results}->{hostname}) : md5_hex('all')) . '_' .
(defined($self->{option_results}->{filter_name}) ? md5_hex($self->{option_results}->{filter_name}) : md5_hex('all'));
(defined($self->{option_results}->{filter_counters}) ? md5_hex($self->{option_results}->{filter_counters}) : md5_hex('all'));
foreach my $counter (keys %{$json_data}) {
next if ($counter !~ /cache/);

View File

@ -129,7 +129,7 @@ sub manage_selection {
$self->{cache_name} = "cache_varnish_" . $self->{mode} . '_' .
(defined($self->{option_results}->{hostname}) ? md5_hex($self->{option_results}->{hostname}) : md5_hex('all')) . '_' .
(defined($self->{option_results}->{filter_name}) ? md5_hex($self->{option_results}->{filter_name}) : md5_hex('all'));
(defined($self->{option_results}->{filter_counters}) ? md5_hex($self->{option_results}->{filter_counters}) : md5_hex('all'));
foreach my $counter (keys %{$json_data}) {
next if ($counter !~ /shm/);