[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
www
www@source.lon-capa.org
Tue, 07 Jun 2011 17:42:29 -0000
www Tue Jun 7 17:42:29 2011 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
Bug #2495: don't cache the version, authors expect immediate results and get confused.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1111 loncom/lonnet/perl/lonnet.pm:1.1112
--- loncom/lonnet/perl/lonnet.pm:1.1111 Mon Jun 6 23:28:48 2011
+++ loncom/lonnet/perl/lonnet.pm Tue Jun 7 17:42:29 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1111 2011/06/06 23:28:48 www Exp $
+# $Id: lonnet.pm,v 1.1112 2011/06/07 17:42:29 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1999,20 +1999,18 @@
sub currentversion {
my $fname=shift;
- my ($result,$cached)=&is_cached_new('resversion',$fname);
- if (defined($cached)) { return $result; }
my $author=$fname;
$author=~s/\/home\/httpd\/html\/res\/([^\/]*)\/([^\/]*).*/$1\/$2/;
my ($udom,$uname)=split(/\//,$author);
- my $home=homeserver($uname,$udom);
+ my $home=&homeserver($uname,$udom);
if ($home eq 'no_host') {
return -1;
}
- my $answer=reply("currentversion:$fname",$home);
+ my $answer=&reply("currentversion:$fname",$home);
if (($answer eq 'con_lost') || ($answer eq 'rejected')) {
return -1;
}
- return &do_cache_new('resversion',$fname,$answer,600);
+ return $answer;
}
#