--- loncom/lonnet/perl/lonnet.pm 2003/06/18 19:10:23 1.381 +++ loncom/lonnet/perl/lonnet.pm 2003/06/19 19:37:45 1.382 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.381 2003/06/18 19:10:23 albertel Exp $ +# $Id: lonnet.pm,v 1.382 2003/06/19 19:37:45 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3652,7 +3652,13 @@ sub gettitle { unless ($urlsymb) { $urlsymb=$ENV{'request.filename'}; } return &metadata($urlsymb,'title'); } - if ($titlecache{$symb}) { return $titlecache{$symb}; } + if ($titlecache{$symb}) { + if (time < ($titlecache{$symb}[1] + 600)) { + return $titlecache{$symb}[0]; + } else { + delete($titlecache{$symb}); + } + } my ($map,$resid,$url)=split(/\_\_\_/,$symb); my $title=''; my %bighash; @@ -3664,7 +3670,7 @@ sub gettitle { } $title=~s/\&colon\;/\:/gs; if ($title) { - $titlecache{$symb}=$title; + $titlecache{$symb}=[$title,time]; return $title; } else { return &metadata($urlsymb,'title');