From: minima Date: Wed, 12 Mar 2003 13:49:39 +0000 (+0000) Subject: restore LRU X-Git-Tag: PRE-1-52~17 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=03c2eda593235d8299fa285827d0caade6fe8fc1;p=spider.git restore LRU --- diff --git a/perl/LRU.pm b/perl/LRU.pm index 29fd3c87..30b264a5 100644 --- a/perl/LRU.pm +++ b/perl/LRU.pm @@ -11,7 +11,7 @@ # # The structure of the base is:- # -# [next, prev, max objects, count, ] +# [next, prev, max objects, count ] # # @@ -37,9 +37,8 @@ sub newbase my $pkg = shift; my $name = shift; my $max = shift; - my $coderef = shift; confess "LRU->newbase requires a name and maximal count" unless $name && $max; - return $pkg->SUPER::new({ }, $max, 0, $name, $coderef); + return $pkg->SUPER::new({ }, $max, 0, $name); } sub get @@ -87,7 +86,6 @@ sub remove my $q = $self->obj->{$call}; confess("$call is already removed") unless $q; dbg("LRU $self->[5] cache remove $call now $self->[4]/$self->[3]") if isdbg('lru'); - &{$self->[5]}($q->obj) if $self->[5]; $q->obj(1); $q->SUPER::del; delete $self->obj->{$call};