Index: openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl,v diff -u -r1.68.2.27 -r1.68.2.28 --- openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl 24 Oct 2022 17:35:35 -0000 1.68.2.27 +++ openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl 17 May 2024 17:01:22 -0000 1.68.2.28 @@ -281,7 +281,7 @@ } # Update the message catalog cache - nsv_set lang_message_$locale $key $message + acs::clusterwide nsv_set lang_message_$locale $key $message } ad_proc -public lang::message::delete { @@ -305,7 +305,7 @@ # Cleanup the nsv caching the message set key "${package_key}.${message_key}" - nsv_unset -nocomplain -- lang_message_$locale $key + acs::clusterwide nsv_unset -nocomplain -- lang_message_$locale $key } ad_proc -private lang::message::undelete { @@ -611,7 +611,7 @@ set nsv_array lang_message_$locale set nsv_key "${package_key}.${message_key}" if { [nsv_exists $nsv_array $nsv_key] } { - nsv_unset $nsv_array $nsv_key + acs::clusterwide nsv_unset $nsv_array $nsv_key } } } @@ -982,15 +982,15 @@ return $message } -ad_proc -public lang::message::cache {} { +ad_proc -public lang::message::cache {{-force:boolean}} { Loads the entire message catalog from the database into the cache. } { # # We segregate messages by language. It might reduce contention if # we segregate instead by package keys. Check mutex contention # nsstats (with ns_info locks). # - if {[nsv_incr lang_message_cache executed_p] == 1} { + if {[nsv_incr lang_message_cache executed_p] == 1 || $force_p} { set i 0 db_foreach select_locale_keys { @@ -1002,8 +1002,6 @@ incr i } - db_release_unused_handles - ns_log Notice "lang::message::cache - Initialized message cache with $i rows from database" } }