Index: openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info,v diff -u -r1.29 -r1.30 --- openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info 30 Aug 2005 17:42:45 -0000 1.29 +++ openacs-4/packages/dotlrn-ecommerce/dotlrn-ecommerce.info 1 Sep 2005 06:43:01 -0000 1.30 @@ -31,6 +31,7 @@ + Index: openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl,v diff -u -r1.49 -r1.50 --- openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl 20 Aug 2005 18:27:54 -0000 1.49 +++ openacs-4/packages/dotlrn-ecommerce/lib/tree-chunk.tcl 1 Sep 2005 06:43:01 -0000 1.50 @@ -14,6 +14,8 @@ { groupby course_name } } +set memoize_max_age [parameter::get -parameter CatalogMemoizeAge -default 10800] + set package_id [ad_conn package_id] set user_id [ad_conn user_id] @@ -525,7 +527,7 @@ # List grades set locale [ad_conn locale] - set section_grades [util_memoize [list dotlrn_ecommerce::section::section_grades $community_id $grade_tree_id]] + set section_grades [util_memoize [list dotlrn_ecommerce::section::section_grades $community_id $grade_tree_id] $memoize_max_age] if { [llength $section_grades] == 1 } { set section_grades "Grade [join $section_grades ", "]" @@ -535,7 +537,7 @@ set section_grades "" } - set course_grades [util_memoize [list dotlrn_ecommerce::section::course_grades $item_id $grade_tree_id]] + set course_grades [util_memoize [list dotlrn_ecommerce::section::course_grades $item_id $grade_tree_id] $memoize_max_age] set letters [lsearch -all -inline -regexp $course_grades {[[:alpha:]]+}] set numbers [lsearch -all -inline -regexp $course_grades {\d+}] @@ -553,9 +555,9 @@ # Build sessions set calendar_id [dotlrn_calendar::get_group_calendar_id -community_id $community_id] lappend calendar_id_list $calendar_id - set sessions [util_memoize [list dotlrn_ecommerce::section::sessions $calendar_id]] + set sessions [util_memoize [list dotlrn_ecommerce::section::sessions $calendar_id] $memoize_max_age] - set instructors [util_memoize [list dotlrn_ecommerce::section::instructors $community_id $__instructors]] + set instructors [util_memoize [list dotlrn_ecommerce::section::instructors $community_id $__instructors] $memoize_max_age] set instructor_names [list] set instructor_ids [list] @@ -576,7 +578,7 @@ append instructor_names " [_ dotlrn-ecommerce.view_bios]" } - set attendees [util_memoize [list dotlrn_ecommerce::section::attendees $section_id]] + set attendees [util_memoize [list dotlrn_ecommerce::section::attendees $section_id] $memoize_max_age] if { ! [empty_string_p $maxparticipants] } { set available_slots [expr $maxparticipants - $attendees] @@ -591,7 +593,7 @@ set available_slots 99999 } - set section_zones [util_memoize [list dotlrn_ecommerce::section::section_zones $community_id]] + set section_zones [util_memoize [list dotlrn_ecommerce::section::section_zones $community_id] $memoize_max_age] if { [llength $section_zones] == 1 } { set section_zones "[_ dotlrn-ecommerce.Zone]: [join $section_zones]" @@ -603,9 +605,9 @@ } if { ! [empty_string_p $product_id] } { - set prices [util_memoize [list dotlrn_ecommerce::section::price $section_id]] + set prices [util_memoize [list dotlrn_ecommerce::section::price $section_id] $memoize_max_age] if { [parameter::get -package_id [ad_conn package_id] -parameter MemberPriceP -default 0 ] } { - set member_price [util_memoize [list dotlrn_ecommerce::section::member_price $section_id]] + set member_price [util_memoize [list dotlrn_ecommerce::section::member_price $section_id] $memoize_max_age] if { $member_price } { if { ! [empty_string_p $member_price] } { append prices " / $member_price" @@ -621,15 +623,15 @@ } } - set member_state [util_memoize [list dotlrn_ecommerce::section::member_state $user_id $community_id]] + set member_state [util_memoize [list dotlrn_ecommerce::section::member_state $user_id $community_id] $memoize_max_age] set waiting_p 0 set pending_p 0 set approved_p 0 switch $member_state { "needs approval" { set waiting_p 1 - set waiting_list_number [util_memoize [list dotlrn_ecommerce::section::waiting_list_number $user_id $community_id]] + set waiting_list_number [util_memoize [list dotlrn_ecommerce::section::waiting_list_number $user_id $community_id] $memoize_max_age] } "awaiting payment" { set waiting_p 2 @@ -680,11 +682,11 @@ set instructor_p [lsearch $instructor_ids $user_id] } - set assessment_id [util_memoize [list dotlrn_ecommerce::section::application_assessment $section_id]] + set assessment_id [util_memoize [list dotlrn_ecommerce::section::application_assessment $section_id] $memoize_max_age] if { ! [empty_string_p $assessment_id] && $assessment_id != -1 } { set button "[_ dotlrn-ecommerce.apply_for_course]" } - set fs_chunk [util_memoize [list dotlrn_ecommerce::section::fs_chunk $section_id]] + set fs_chunk [util_memoize [list dotlrn_ecommerce::section::fs_chunk $section_id] $memoize_max_age] set description [ad_text_to_html $description] }