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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 20 Jul 2006 03:00:45 -0000


albertel		Wed Jul 19 23:00:45 2006 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - moving devalidateor to be near code which does the insertion
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.763 loncom/lonnet/perl/lonnet.pm:1.764
--- loncom/lonnet/perl/lonnet.pm:1.763	Wed Jul 19 21:18:46 2006
+++ loncom/lonnet/perl/lonnet.pm	Wed Jul 19 23:00:45 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.763 2006/07/20 01:18:46 www Exp $
+# $Id: lonnet.pm,v 1.764 2006/07/20 03:00:45 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5155,16 +5155,6 @@
     &devalidate_cache_new('courseres',$hashid);
 }
 
-# ------------------------------------------------------ Devalidate title cache
-
-sub devalidate_title_cache {
-    my ($url)=@_;
-    if (!$env{'request.course.id'}) { return; }
-    my $symb=&symbread($url);
-    if (!$symb) { return; }
-    my $key=$env{'request.course.id'}."\0".$symb;
-    &devalidate_cache_new('title',$key);
-}
 
 # --------------------------------------------------- Course Resourcedata Query
 
@@ -5887,6 +5877,17 @@
     }
 }
 
+# ------------------------------------------------------ Devalidate title cache
+
+sub devalidate_title_cache {
+    my ($url)=@_;
+    if (!$env{'request.course.id'}) { return; }
+    my $symb=&symbread($url);
+    if (!$symb) { return; }
+    my $key=$env{'request.course.id'}."\0".$symb;
+    &devalidate_cache_new('title',$key);
+}
+
 # ------------------------------------------------- Get the title of a resource
 
 sub gettitle {