Skip to content

Commit

Permalink
* Fix bug where search strings that were defined with mv_search_map
Browse files Browse the repository at this point in the history
  would not be used to create unique more cache key.
  • Loading branch information
Mike Heins committed Jul 26, 2016
1 parent 372f515 commit 3bdebfc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/Vend/Scan.pm
Expand Up @@ -259,6 +259,20 @@ sub create_last_search {
my @val;
my ($key, $val);
while( ($key, $val) = each %$ref) {
if($key eq 'mv_search_map') {
my @keys = grep /\w/, split /[\s,\0]+/, $ref->{$key};
for(@keys) {
s/.*=//;
s/\s+$//;
}
for my $k (@keys) {
my $val = $ref->{$k};
$val =~ s!/!__SLASH__!g;
$val =~ s!(\W)!sprintf '%%%02x', ord($1)!eg;
$val =~ s!__SLASH__!::!g;
push @out, "$k=$val";
}
}
next unless defined $RevScan{$key};
@val = split /\0/, $val;
for(@val) {
Expand All @@ -269,6 +283,7 @@ sub create_last_search {
}
}


# Make repeatable for permanent store
@out = sort @out;

Expand Down

0 comments on commit 3bdebfc

Please sign in to comment.