-
- # clear out the cache periodically to stop it growing for ever.
- if ($main::systime - $lasttime >= 15*60) {
- if (isdbg('prefix')) {
- my $percent = sprintf "%.1f", $hits * 100 / $matchtotal;
- dbg("Prefix Cache Cleared, Hits: $hits of $matchtotal = $percent\%") ;
- }
- %cache =();
- $lasttime = $main::systime;
- $hits = $matchtotal = 0;
- }