--- loncom/lonnet/perl/lonnet.pm 2003/12/02 19:35:26 1.451 +++ loncom/lonnet/perl/lonnet.pm 2003/12/04 20:09:35 1.452 @@ -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 @@ sub getsection { 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 do_cache { 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 @@ EVALBLOCK 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;