-# chomp $text;
-# $text = substr($text, 0, $duplth) if length $text > $duplth;
- my $dupkey = "$d|$sfi|$k|$a|$r";
- return 1 if exists $dup{$dupkey};
- $dup{$dupkey} = $d; # in seconds (to the nearest minute)
- return 0;
-}
-
-# called every hour and cleans out the dup cache
-sub process
-{
- my $cutoff = $main::systime - $dupage;
- while (my ($key, $val) = each %dup) {
- delete $dup{$key} if $val < $cutoff;
- }
+ my $dupkey = "C$d|$sfi|$k|$a|$r";
+ return DXDupe::check($dupkey, $main::systime+$dupage);