[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm /html/adm/help/tex Caching.tex /interface londocs.pm lonparmset.pm doc/loncapafiles loncapafiles.lpml

www lon-capa-cvs@mail.lon-capa.org
Wed, 16 Jul 2003 19:36:02 -0000


www		Wed Jul 16 15:36:02 2003 EDT

  Added files:                 
    /loncom/html/adm/help/tex	Caching.tex 

  Modified files:              
    /doc/loncapafiles	loncapafiles.lpml 
    /loncom/homework	structuretags.pm 
    /loncom/interface	londocs.pm lonparmset.pm 
  Log:
  Help on caching to avoid confusion.
  
  
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.266 doc/loncapafiles/loncapafiles.lpml:1.267
--- doc/loncapafiles/loncapafiles.lpml:1.266	Tue Jul 15 17:26:23 2003
+++ doc/loncapafiles/loncapafiles.lpml	Wed Jul 16 15:36:02 2003
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.266 2003/07/15 21:26:23 www Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.267 2003/07/16 19:36:02 www Exp $ -->
 
 <!--
 
@@ -1933,6 +1933,7 @@
 Authoring_Structure_Tags.tex;
 Authoring_XML_Intro.tex;
 CAPA_LON-CAPA_function_diffs.tex;
+Caching.tex;
 Calendar_Add_Announcement.tex;
 Calendar_Remove_Announcement.tex;
 Calling_Functions.tex;
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.195 loncom/homework/structuretags.pm:1.196
--- loncom/homework/structuretags.pm:1.195	Fri Jul 11 11:10:54 2003
+++ loncom/homework/structuretags.pm	Wed Jul 16 15:36:02 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.195 2003/07/11 15:10:54 sakharuk Exp $
+# $Id: structuretags.pm,v 1.196 2003/07/16 19:36:02 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1097,7 +1097,8 @@
         my $url=$ENV{'REQUEST_URI'};
         $url=~s/\?.*$//;
 	$result='<table width="100%" bgcolor="#FFFFAA" border="2"><tr><td>'.
-                '<a href="'.$url.'/smpedit">Simple Problem Editor</a> - Note: it can take up to 10 minutes for changes to take effect for all users.</td></tr></table><br />';
+                '<a href="'.$url.'/smpedit">Simple Problem Editor</a> - Note: it can take up to 10 minutes for changes to take effect for all users.'.
+&Apache::loncommon::help_open_topic('Caching').'</td></tr></table><br />';
     }
     return $result;
 }
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.66 loncom/interface/londocs.pm:1.67
--- loncom/interface/londocs.pm:1.66	Tue Jul 15 16:08:28 2003
+++ loncom/interface/londocs.pm	Wed Jul 16 15:36:02 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.66 2003/07/15 20:08:28 bowersj2 Exp $
+# $Id: londocs.pm,v 1.67 2003/07/16 19:36:02 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -388,9 +388,9 @@
     $help{'Bulletin Board'} = &Apache::loncommon::help_open_topic(
 		    'Docs_About_Bulletin_Board,Docs_Editing_Templated_Pages');
     $help{'My Personal Info'} = &Apache::loncommon::help_open_topic(
-		    'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages');
-    
-
+		  'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages');
+    $help{'Caching'} = &Apache::loncommon::help_open_topic('Caching');
+ 
   if ($ENV{'form.verify'}) {
  
    my $loaderror=&Apache::lonnet::overloaderror($r);
@@ -685,7 +685,8 @@
 '<script>function reinit(tf) { tf.submit();'.$postexec.' }</script>'. 
 '<form method="post" action="/adm/roles" target="loncapaclient">'.
 '<input type="hidden" name="orgurl" value="/adm/coursedocs" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">Changes will become active for your current session after <input type="hidden" name="'.
-$ENV{'request.role'}.'" value="1" /><input type="button" value="re-initializing course" onClick="reinit(this.form)"/>, or the next time you log in.</font></h3></form>');
+$ENV{'request.role'}.'" value="1" /><input type="button" value="re-initializing course" onClick="reinit(this.form)"/>, or the next time you log in.'.
+$help{'Caching'}.'</font></h3></form>');
        }
        my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time.
                      '.sequence';
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.115 loncom/interface/lonparmset.pm:1.116
--- loncom/interface/lonparmset.pm:1.115	Tue Jul 15 17:12:01 2003
+++ loncom/interface/lonparmset.pm	Wed Jul 16 15:36:02 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.115 2003/07/15 21:12:01 www Exp $
+# $Id: lonparmset.pm,v 1.116 2003/07/16 19:36:02 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -858,7 +858,7 @@
 	    $message.="<font color=red>Write Error: $1</font>";
 	}
 # ---------------------------------------------------------------- Done storing
-	$message.='<h3>Changes can take up to 10 minutes before being active for all students</h3>';
+	$message.='<h3>Changes can take up to 10 minutes before being active for all students.'.&Apache::loncommon::help_open_topic('Caching').'</h3>';
     }
 # --------------------------------------------- Devalidate cache for this child
     &Apache::lonnet::devalidatecourseresdata(

Index: loncom/html/adm/help/tex/Caching.tex
+++ loncom/html/adm/help/tex/Caching.tex
\label{Caching}
LON-CAPA does not serve static web pages, but generates pages and other 
resources dynamically and adaptively based on a large number of data input
sources, such as the user preference, the course environment, maps, etc.

Since LON-CAPA also has to sustain large workloads, it is 
prohibitive to gather, compile, and process these data for every single
access, when in the vast majority of cases, nothing has changed between the
current and previous requests.

LON-CAPA thus caches data. There are basically two different 
\textbf{caching mechanisms\index{caching mechanisms}}, which LON-CAPA uses:

\begin{itemize}
\item Caching at \textbf{course initialization\index{course initialization}}:
Several sources of data are compiled when a user enters a course during a 
session. An example is the table of contents (DOCS/NAV) for the course - 
if you change DOCS, you need
to re-enter (``\textbf{re-initialize}'') the course in order to see the 
effects.

The course environment (PARM/Course Environment) in general also only gets 
evaluated when entering a course, and while it does get re-evaluated for your
session whenever you change anything, it - like DOCS changes - will not 
immediately take effect for
other users currently working in the course. So if for example you disable
course discussion, users will only be prevented from discussion when they 
enter the course the next time. 

\item Caching of \textbf{assessment parameters\index{assessment parameters}}:
Data such as the deadline of homework problems, and the text of Simple 
Problems, is only re-read \textbf{every ten minutes}. It can thus happen that
you open up a homework problem in PARM, but for another ten minutes, some 
students cannot access it. Also changes to Simple Problems will not immediately
take effect for all users (including yourself).
\end{itemize}
 
It is important to be aware of these mechanisms, since otherwise results can
be confusing (``Didn't I just change this???'').