Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl,v diff -u -r1.141.2.13 -r1.141.2.14 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 27 Feb 2020 21:48:39 -0000 1.141.2.13 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 30 Mar 2020 19:30:39 -0000 1.141.2.14 @@ -1331,12 +1331,23 @@ -package_key acs-tcl \ -parameter SiteNodesCache \ -default_size 2000000 + # + # In case we have "ns_hash" defined, we can use the + # "HashKeyPartitionedCache". Otherwise fall back to the + # plain cache. + # + if {[::acs::icanuse "ns_hash"]} { + ::acs::HashKeyPartitionedCache create ::acs::site_nodes_id_cache \ + -package_key acs-tcl \ + -parameter SiteNodesIdCache \ + -default_size 100000 + } else { + ::acs::Cache create ::acs::site_nodes_id_cache \ + -package_key acs-tcl \ + -parameter SiteNodesIdCache \ + -default_size 100000 + } - ::acs::Cache create ::acs::site_nodes_id_cache \ - -package_key acs-tcl \ - -parameter SiteNodesIdCache \ - -default_size 100000 - ::acs::KeyPartitionedCache create ::acs::site_nodes_children_cache \ -package_key acs-tcl \ -parameter SiteNodesChildenCache \ @@ -1452,15 +1463,15 @@ # :flush_per_request_cache - + switch -glob -- $pattern { id-* {set cache site_nodes_id_cache} get_children-* {set cache site_nodes_children_cache} default {set cache site_nodes_cache} } ::acs::$cache flush_pattern -partition_key $partition_key $pattern } - + :public method flush_cache {-node_id:required,1..1 {-with_subtree:boolean true} {-url ""}} { # # Flush entries from site-node tree, including the current node,