[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
stredwic
lon-capa-cvs@mail.lon-capa.org
Tue, 21 May 2002 13:06:07 -0000
stredwic Tue May 21 09:06:07 2002 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
See bug 458. Added true value for new flag in lonnet::homeserver. Supposed to use negative caching to speed up the display of the roles page.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.228 loncom/lonnet/perl/lonnet.pm:1.229
--- loncom/lonnet/perl/lonnet.pm:1.228 Sat May 18 15:59:07 2002
+++ loncom/lonnet/perl/lonnet.pm Tue May 21 09:06:07 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.228 2002/05/18 19:59:07 harris41 Exp $
+# $Id: lonnet.pm,v 1.229 2002/05/21 13:06:07 stredwic Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -481,21 +481,22 @@
# ---------------------- Find the homebase for a user from domain's lib servers
sub homeserver {
- my ($uname,$udom)=@_;
+ my ($uname,$udom, $cacheBadFlag)=@_;
my $index="$uname:$udom";
if ($homecache{$index}) {
return "$homecache{$index}";
}
my $tryserver;
foreach $tryserver (keys %libserv) {
- next if (exists($badhomecache{$index}->{$tryserver}));
+ next if ($cacheBadFlag eq 'true' &&
+ exists($badhomecache{$index}->{$tryserver}));
if ($hostdom{$tryserver} eq $udom) {
my $answer=reply("home:$udom:$uname",$tryserver);
if ($answer eq 'found') {
$homecache{$index}=$tryserver;
return $tryserver;
} else {
- $badhomecache{$index}->{$tryserver}=1;
+ $badhomecache{$index}->{$tryserver}=1;
}
} else {
$badhomecache{$index}->{$tryserver}=1;