--- loncom/lonnet/perl/lonnet.pm 2001/11/17 18:20:33 1.172 +++ loncom/lonnet/perl/lonnet.pm 2001/11/20 22:30:20 1.174 @@ -37,7 +37,7 @@ # 10/5,10/10,11/13,11/15 Scott Harrison # 11/17 Gerd Kortemeyer # -# $Id: lonnet.pm,v 1.172 2001/11/17 18:20:33 www Exp $ +# $Id: lonnet.pm,v 1.174 2001/11/20 22:30:20 www Exp $ # ### @@ -1662,7 +1662,6 @@ sub definerole { sub metadata_query { my ($query,$custom,$customshow)=@_; - # need to put in a library server loop here and return a hash my %rhash; for my $server (keys %libserv) { unless ($custom or $customshow) { @@ -2243,7 +2242,7 @@ sub metadata { # If "keys" are set, the assumption is that everything is already cached. # Everything is cached by the main uri, libraries are never directly cached # - unless ($metacache{$uri.':keys'}) { + unless (abs($metacache{$uri.':cachedtimestamp'}-time)<600) { # # Is this a recursive call for a library? # @@ -2342,6 +2341,7 @@ sub metadata { } } $metacache{$uri.':keys'}=join(',',keys %metathesekeys); + $metacache{$uri.':cachedtimestamp'}=time; } return $metacache{$uri.':'.$what}; }