Forum OpenACS Development: Two caching issues within OpenACS clustering on 5.10.1b

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

Dear Jonathan,

Many thanks for the report. I'll look into this when time permits. It is not unlikely that there are still more "acs::clusterwide" operations are missing,, depending on usage patterns.

util_memoize_seed
There is exactly one place, where this is used, ... in a questionable way. Probably, the construct should be changed. However, for now, i have added your change.

message catalog
i also accepted your change and addressed one more issue. I am not fully confident that this addresses all potential problems. I case, you see further issues, run "acs::clusterwide lang::message::cache -force" e.g. from ds/shell

Many thanks for these good contributions!