[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 05 May 2005 20:50:38 -0000
albertel Thu May 5 16:50:38 2005 EDT
Modified files:
/loncom/interface lonparmset.pm
/loncom/lonnet/perl lonnet.pm
Log:
- moving away from the $env{'cache.*'} idea, never really did like it
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.190 loncom/interface/lonparmset.pm:1.191
--- loncom/interface/lonparmset.pm:1.190 Thu Apr 7 02:56:23 2005
+++ loncom/interface/lonparmset.pm Thu May 5 16:50:38 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.190 2005/04/07 06:56:23 albertel Exp $
+# $Id: lonparmset.pm,v 1.191 2005/05/05 20:50:38 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -279,6 +279,7 @@
$reply=&Apache::lonnet::cput
('resourcedata',\%storecontent,$udom,$uname);
}
+ &Apache::lonnet::devalidateuserresdata($uname,$udom);
}
if ($reply=~/^error\:(.*)/) {
@@ -933,7 +934,7 @@
&Apache::lonnet::devalidatecourseresdata(
$env{'course.'.$env{'request.course.id'}.'.num'},
$env{'course.'.$env{'request.course.id'}.'.domain'});
- &Apache::lonnet::clear_EXT_cache_status();
+ #&Apache::lonnet::clear_EXT_cache_status();
# -------------------------------------------------------------- Get coursedata
%courseopt = &Apache::lonnet::dump
('resourcedata',
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.632 loncom/lonnet/perl/lonnet.pm:1.633
--- loncom/lonnet/perl/lonnet.pm:1.632 Tue May 3 15:22:22 2005
+++ loncom/lonnet/perl/lonnet.pm Thu May 5 16:50:38 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.632 2005/05/03 19:22:22 albertel Exp $
+# $Id: lonnet.pm,v 1.633 2005/05/05 20:50:38 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4145,6 +4145,12 @@
return $result;
}
+sub devalidateuserresdata {
+ my ($uname,$udom)=@_;
+ my $hashid="$udom:$uname";
+ &devalidate_cache_new('userres',$hashid);
+}
+
sub get_userresdata {
my ($uname,$udom)=@_;
#most student don\'t have any data set, check if there is some data
@@ -4168,7 +4174,8 @@
$uname." at ".$udom.": ".
$tmp."</font>");
} elsif ($tmp=~/error: 2 /) {
- &EXT_cache_set($udom,$uname);
+ #&EXT_cache_set($udom,$uname);
+ &do_cache_new('userres',$hashid,undef,600);
}
return $tmp;
}
@@ -4212,7 +4219,7 @@
sub EXT_cache_set {
my ($target_domain,$target_user) = @_;
my $cachename = 'cache.EXT.'.$target_user.'.'.$target_domain;
- &appenv($cachename => time);
+ #&appenv($cachename => time);
}
# --------------------------------------------------------- Value of a Variable