Index: openacs-4/packages/chat/tcl/chat-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/chat-init.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/chat/tcl/chat-init.tcl 10 Oct 2008 11:30:35 -0000 1.5 +++ openacs-4/packages/chat/tcl/chat-init.tcl 28 May 2018 17:32:18 -0000 1.6 @@ -13,3 +13,22 @@ ad_schedule_proc -thread t -schedule_proc ns_schedule_daily [list 0 5] chat_flush_rooms +# +# Create a cache for keeping chat_room info +# +# The chat_room_cache can be configured via the config file like the +# following: +# +# ns_section ns/server/${server}/acs/chat +# ns_param ChatRoomCacheSize 350000 +# ns_param ChatRoomCacheTimeout [expr {3600 * 24}] +# +ns_cache create chat_room_cache \ + -size [parameter::get \ + -package_id [apm_package_id_from_key chat] \ + -parameter ChatRoomCacheSize \ + -default 350000] \ + -timeout [parameter::get \ + -package_id [apm_package_id_from_key chat] \ + -parameter ChatCacheTimeout \ + -default [expr {3600 * 24}]] Index: openacs-4/packages/chat/tcl/chat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/chat-procs.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/packages/chat/tcl/chat-procs.tcl 9 May 2018 15:33:30 -0000 1.18 +++ openacs-4/packages/chat/tcl/chat-procs.tcl 28 May 2018 17:32:18 -0000 1.19 @@ -164,12 +164,6 @@ db_string post_message {} } -# create a cache for the chat package -if {"chat_room_cache" ni [ns_cache_names]} { -# these should be around 1000 entries - ns_cache_create chat_room_cache 350000 -} - ad_proc -public chat_room_get { {-room_id {}} {-array:required}