Index: openacs-4/packages/xotcl-core/xotcl-core.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/xotcl-core.info,v
diff -u -r1.106.2.35 -r1.106.2.36
--- openacs-4/packages/xotcl-core/xotcl-core.info 8 Jan 2022 15:18:10 -0000 1.106.2.35
+++ openacs-4/packages/xotcl-core/xotcl-core.info 9 Jan 2022 17:51:01 -0000 1.106.2.36
@@ -10,7 +10,7 @@
t
xotcl
-
+
Gustaf Neumann
XOTcl library functionality (e.g. thread handling, online documentation, Generic Form and List Classes)
2021-09-16
@@ -42,12 +42,12 @@
BSD-Style
2
-
+
-
+
Index: openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl,v
diff -u -r1.41.2.45 -r1.41.2.46
--- openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 7 Jan 2022 13:59:48 -0000 1.41.2.45
+++ openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 9 Jan 2022 17:51:01 -0000 1.41.2.46
@@ -762,10 +762,11 @@
{-default_lang ""}
{-parent_id ""}
} {
- #set t0 [clock clicks -microseconds]
set form_item_ids \
[acs::per_request_cache eval \
- -key xotcl-core.instantiate_forms-$forms-$default_lang-${:folder_id}-$parent_id \
+ -key xotcl-core.instantiate_forms-$forms-$default_lang-$parent_id \
+ -no_cache {} \
+ -from_cache_indicator from_cache \
{
set form_item_ids {}
foreach item_ref [split $forms |] {
@@ -791,11 +792,20 @@
set form_item_ids
}]
- #:log "instantiate: parent_id=$parent_id-forms=$forms -> $form_item_ids"
- #set t1 [clock clicks -microseconds]
- #ns_log notice "instantiate_forms parent_id $parent_id $forms -> $form_item_ids [expr {($t1-$t0)/1000.0}]ms "
+ #
+ # In case we got the item_ids from the pre-request cache, make
+ # sure to load these. This should not be an issue in most
+ # situations, but in the test-suite multiple request functions are
+ # bundled in a "request" such that will become an issue, when the
+ # per-request cache is not flushed quick enough.
+ #
+ if {$from_cache} {
+ #ns_log notice "... instantiate_forms -forms $forms -default_lang $default_lang -parent_id $parent_id --> '$form_item_ids'"
+ ::xo::db::CrClass ensure_item_ids_instantiated -item_ids $form_item_ids
+ }
return $form_item_ids
}
+
::xo::Package instproc get_parameter {attribute {default ""}} {
# set package_id ${:id}
# set parameter_obj [::xo::parameter get_parameter_object \