We have to also check ->{finished}, rather than the existence of a row
at all, since now unfinished jobs can appear in the cache.
Because the cache key includes the job status, when the job becomes
finished the cache entry will be invalidated.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
cache_row_lookup_prep(\$jr);
my $endedrow = cacheable_query($endedq, $jr, 'e');
- if (!$endedrow) {
+ if (!defined $endedrow->{finished}) {
+ cache_write_entry(\*H, $jr);
#print DEBUG "no-finished\n";
next;
}