[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm

raeburn raeburn at source.lon-capa.org
Fri Jan 1 09:45:38 EST 2021


raeburn		Fri Jan  1 14:45:38 2021 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm 
  Log:
  - Need to devalidate loadbalancing item in memcache when only change is 
    deletion of an existing loadbalancer.
  
  
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.374 loncom/interface/domainprefs.pm:1.375
--- loncom/interface/domainprefs.pm:1.374	Wed Dec 23 21:39:23 2020
+++ loncom/interface/domainprefs.pm	Fri Jan  1 14:45:38 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.374 2020/12/23 21:39:23 raeburn Exp $
+# $Id: domainprefs.pm,v 1.375 2021/01/01 14:45:38 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -20721,24 +20721,24 @@
                             $resulttext .= '<li>'.&mt('Load Balancer: [_1] -- cookie use enabled',
                                                       $balancer).'</li>'; 
                         }
-                        if (keys(%toupdate)) {
-                            my %thismachine;
-                            my $updatedhere;
-                            my $cachetime = 60*60*24;
-                            map { $thismachine{$_} = 1; } &Apache::lonnet::current_machine_ids();
-                            foreach my $lonhost (keys(%toupdate)) {
-                                if ($thismachine{$lonhost}) {
-                                    unless ($updatedhere) {
-                                        &Apache::lonnet::do_cache_new('loadbalancing',$dom,
-                                                                      $defaultshash{'loadbalancing'},
-                                                                      $cachetime);
-                                        $updatedhere = 1;
-                                    }
-                                } else {
-                                    my $cachekey = &escape('loadbalancing').':'.&escape($dom);
-                                    &Apache::lonnet::remote_devalidate_cache($lonhost,[$cachekey]);
-                                }
+                    }
+                }
+                if (keys(%toupdate)) {
+                    my %thismachine;
+                    my $updatedhere;
+                    my $cachetime = 60*60*24;
+                    map { $thismachine{$_} = 1; } &Apache::lonnet::current_machine_ids();
+                    foreach my $lonhost (keys(%toupdate)) {
+                        if ($thismachine{$lonhost}) {
+                            unless ($updatedhere) {
+                                &Apache::lonnet::do_cache_new('loadbalancing',$dom,
+                                                              $defaultshash{'loadbalancing'},
+                                                              $cachetime);
+                                $updatedhere = 1;
                             }
+                        } else {
+                            my $cachekey = &escape('loadbalancing').':'.&escape($dom);
+                            &Apache::lonnet::remote_devalidate_cache($lonhost,[$cachekey]);
                         }
                     }
                 }




More information about the LON-CAPA-cvs mailing list