Prep work.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
close H;
}
+sub cache_row_lookup_prep ($) {
+ my ($jrr) = @_;
+
+ my $cacherow = $cache{cache_row_key($$jrr)};
+ if ($cacherow) {
+ $$jrr = $cacherow;
+ $cachehits++;
+ }
+}
+
sub cache_write_entry ($$) {
my ($fh, $jr) = @_;
print $fh "<!-- osstest-report-reuseable";
foreach my $jr (@$inrows) {
#print DEBUG "JOB $jr->{flight}.$jr->{job} ";
- my $cacherow = $cache{cache_row_key($jr)};
- if ($cacherow) {
- $jr = $cacherow;
- $cachehits++;
- }
+ cache_row_lookup_prep(\$jr);
my $endedrow = cacheable_query($endedq, $jr, 'e');
if (!$endedrow) {