1. make sh/log et al a bit more efficient.
2. fix dupe message in dx.
3. update cty.dat to the latest, add k8T, K8O to KH8 and TX5BTY to FO/A
+4. clear cache on reload of prefixes
25Oct02=======================================================================
1. remove the dupefile automatically if it becomes corrupted
2. instrument the startup slightly more
return $count;
}
+sub close
+{
+ my $base = shift;
+ $base->flush;
+ $base->[PREV] = $base->[NEXT] = undef;
+}
+
1;
__END__
# Below is the stub of documentation for your module. You better edit it!
%prefix_loc = (); # the meat of the info
%pre = (); # the prefix list
$hits = $misses = $matchtotal = 1; # cache stats
-$lrusize = 2000; # size of prefix LRU cache
-
-$lru = LRU->newbase('Prefix', $lrusize);
+$lrusize = 1000; # size of prefix LRU cache
sub load
{
untie %pre;
%pre = ();
%prefix_loc = ();
+ $lru->close if $lru;
+ undef $lru;
}
# tie the main prefix database
my $out = $@ if $@;
do "$main::data/prefix_data.pl" if !$out;
$out = $@ if $@;
+ $lru = LRU->newbase('Prefix', $lrusize);
return $out;
}