[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 04 Dec 2003 20:09:35 -0000
albertel Thu Dec 4 15:09:35 2003 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- the disk based caching is having issues, disabling it for now (BUG# 2417)
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.451 loncom/lonnet/perl/lonnet.pm:1.452
--- loncom/lonnet/perl/lonnet.pm:1.451 Tue Dec 2 14:35:26 2003
+++ loncom/lonnet/perl/lonnet.pm Thu Dec 4 15:09:35 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.451 2003/12/02 19:35:26 albertel Exp $
+# $Id: lonnet.pm,v 1.452 2003/12/04 20:09:35 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -848,10 +848,14 @@
return '-1';
}
+
+my $disk_caching_disabled=1;
+
sub devalidate_cache {
my ($cache,$id,$name) = @_;
delete $$cache{$id.'.time'};
delete $$cache{$id};
+ if ($disk_caching_disabled) { return; }
my $filename=$perlvar{'lonDaemons'}.'/tmp/lonnet_internal_cache_'.$name.".db";
open(DB,"$filename.lock");
flock(DB,LOCK_EX);
@@ -907,6 +911,7 @@
sub save_cache_item {
my ($cache,$name,$id)=@_;
+ if ($disk_caching_disabled) { return; }
my $starttime=&Time::HiRes::time();
# &logthis("Saving :$name:$id");
my %hash;
@@ -936,6 +941,7 @@
sub load_cache_item {
my ($cache,$name,$id)=@_;
+ if ($disk_caching_disabled) { return; }
my $starttime=&Time::HiRes::time();
# &logthis("Before Loading $name for $id size is ".scalar(%$cache));
my %hash;