--- loncom/interface/loncoursedata.pm 2003/10/02 14:11:36 1.98 +++ loncom/interface/loncoursedata.pm 2003/10/02 17:07:41 1.99 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursedata.pm,v 1.98 2003/10/02 14:11:36 matthew Exp $ +# $Id: loncoursedata.pm,v 1.99 2003/10/02 17:07:41 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1069,6 +1069,36 @@ sub get_student { ################################################ ################################################ + +=pod + +=item &clear_internal_caches() + +Causes the internal caches used in get_student_id, get_student, +get_symb_id, get_symb, get_part_id, and get_part to be undef'd. + +Needs to be called before the first operation with the MySQL database +for a given Apache request. + +=cut + +################################################ +################################################ +sub clear_internal_caches { + $have_read_part_table = 0; + undef(%ids_by_part); + undef(%parts_by_id); + $have_read_symb_table = 0; + undef(%ids_by_symb); + undef(%symbs_by_id); + $have_read_student_table = 0; + undef(%ids_by_student); + undef(%students_by_id); +} + + +################################################ +################################################ =pod