Skip to content
Browse files

[#18024023] Cache key being produced from too short data sample

  • Loading branch information...
1 parent d9e11fc commit 784b73c3343fa8e6017bedf2454ca162ec7254d8 @ctfliblime ctfliblime committed
Showing with 3 additions and 0 deletions.
  1. +3 −0 opac/opac-search.pl
View
3 opac/opac-search.pl
@@ -45,6 +45,9 @@ sub MRXcached {
$xml = shift;
}
my $matchme = substr($xml, 0, 1024);
+ # Very similar records may not have differentiable data within
+ # the first 1k, so tack on a bit from the record's tail, too.
+ $matchme .= substr($xml, -255);
my $key = Digest::SHA1::sha1($matchme);
my $frozen = $cache->get($key);

0 comments on commit 784b73c

Please sign in to comment.
Something went wrong with that request. Please try again.