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}]]