We are testing a clustering environment for one of our applications and I found two issues with caching in the OpenACS. Please review and let me know if there is something I may have missed in my setup or advise otherwise if the fixes are not the correct solution.
1. ad_set_client_property which calls util_memoize_seed proc and in that proc there is no notification to the cluster to flush the existing value so on other nodes the value is out of sync.
Updating the util_memoize_seed proc in packages/acs-tcl/tcl/memoize-procs-naviserver.tcl with the following addition resolves the issue in my testing.
@param max_age Not used.
} {
+ util_memoize_flush $script
ns_cache_eval -force util_memoize $script [list set _ $value]
}
2. Registering a new message in the localization subsystem does not sync the new addition to other nodes in the cluster. Updating the lang::message::register proc in packages/acs-lang/tcl/lang-message-procs.tcl resolves the issue from my tests.
# Update the message catalog cache
nsv_set lang_message_$locale $key $message
+ acs::clusterwide nsv_set lang_message_$locale $key $message