[LON-CAPA-cvs] cvs: loncom(version_1_3_X_memcached) /lonnet/perl lonnet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 15 Apr 2005 20:48:19 -0000


albertel		Fri Apr 15 16:48:19 2005 EDT

  Modified files:              (Branch: version_1_3_X_memcached)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - backport 1.623
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.587.2.3.2.15 loncom/lonnet/perl/lonnet.pm:1.587.2.3.2.16
--- loncom/lonnet/perl/lonnet.pm:1.587.2.3.2.15	Wed Feb 23 18:28:54 2005
+++ loncom/lonnet/perl/lonnet.pm	Fri Apr 15 16:48:18 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.587.2.3.2.15 2005/02/23 23:28:54 albertel Exp $
+# $Id: lonnet.pm,v 1.587.2.3.2.16 2005/04/15 20:48:18 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1067,6 +1067,9 @@
     if (!defined($setvalue)) {
 	$setvalue='__undef__';
     }
+    if (!defined($time)) {
+	$time=600;
+    }
     if ($debug) { &Apache::lonnet::logthis("Setting $id to $value"); }
     $memcache->set($id,$setvalue,$time);
     #&make_room($id,$value,$debug);
@@ -4415,7 +4418,7 @@
 		if (!defined($cached)) {
 		    my %resourcedata=&dump('resourcedata',$udom,$uname);
 		    $result=\%resourcedata;
-		    &do_cache_new('userres',$hashid,$result);
+		    &do_cache_new('userres',$hashid,$result,600);
 		}
 		my ($tmp)=keys(%$result);
 		if (($tmp!~/^error\:/) && ($tmp!~/^con_lost/)) {
@@ -4736,7 +4739,7 @@
 	$metaentry{':keys'}=join(',',keys %metathesekeys);
 	&metadata_generate_part0(\%metathesekeys,\%metaentry,$uri);
 	$metaentry{':allpossiblekeys'}=join(',',keys %metathesekeys);
-	&do_cache_new('meta',$uri,\%metaentry);
+	&do_cache_new('meta',$uri,\%metaentry,6000);
 # this is the end of "was not already recently cached
     }
     return $metaentry{':'.$what};