110 |
|
|
111 |
Retrive from disk one data_structure records using field 000 as key |
Retrive from disk one data_structure records using field 000 as key |
112 |
|
|
113 |
my @ds = $db->load_ds($rec); |
my $ds = $db->load_ds($rec); |
114 |
|
|
115 |
This function will also perform basic sanity checking on returned |
This function will also perform basic sanity checking on returned |
116 |
data and disable caching if data is corrupted (or changed since last |
data and disable caching if data is corrupted (or changed since last |
117 |
update). |
update). |
118 |
|
|
119 |
Returns array or undef if cacheing is disabled or unavailable. |
Returns hash or undef if cacheing is disabled or unavailable. |
120 |
|
|
121 |
=cut |
=cut |
122 |
|
|
154 |
} |
} |
155 |
}; |
}; |
156 |
if ($ok && $ds_ref->{'ds'}) { |
if ($ok && $ds_ref->{'ds'}) { |
157 |
return @{ $ds_ref->{'ds'} }; |
return $ds_ref->{'ds'}; |
158 |
} else { |
} else { |
159 |
$log->warn("cache entry $cache_path corrupt. Use rm $cache_path/* to re-create it on next run!"); |
$log->warn("cache entry $cache_path corrupt. Use rm $cache_path/* to re-create it on next run!"); |
160 |
undef $self->{'path'}; |
undef $self->{'path'}; |
173 |
Store data_structure on disk. |
Store data_structure on disk. |
174 |
|
|
175 |
$db->save_ds( |
$db->save_ds( |
176 |
ds => \@ds, |
ds => $ds, |
177 |
current_filename => $self->{'current_filename'}, |
current_filename => $self->{'current_filename'}, |
178 |
headline => $self->{'headline'}, |
headline => $self->{'headline'}, |
179 |
); |
); |