site-nodes-init.tcl
Does not contain a contract.
- Location:
- /packages/acs-tcl/tcl/site-nodes-init.tcl
Related Files
[ hide source ] | [ make this the default ]
File Contents
ad_library { @author rhs@mit.edu @creation-date 2000-09-07 @cvs-id $Id: site-nodes-init.tcl,v 1.10 2024/09/11 06:15:48 gustafn Exp $ } nsv_set site_nodes_mutex mutex [ns_mutex create oacs:site_nodes] site_node::init_cache # # In case, we have a recent version of NaviServer, we can use # ns_urlspace for mapping tree data. # if {[namespace which ns_urlspace] ne "" && [::acs::dc info lookup method call] ne ""} { # # Prefetch paths, which should not be mapped to the base node "/", # since these have to go through the classical mapping, where we # need for every possible path a single cache entry. By mapping eg # "/resources/*" to the sitenode of "/", we can remove this redundancy. # # The list of prefetched command can be extended via the config file # # ns_section ns/server/${server}/acs/acs-tcl # ns_param SiteNodesPrefetch {/file /changelogs /munin} # set extraPaths [parameter::get \ -package_id [apm_package_id_from_key acs-tcl] \ -parameter SiteNodesPrefetch \ -default {}] foreach path [list /repository /resources {*}$extraPaths] { set node_id [site_node::get_node_id -url $path] set cmd [list ns_urlspace set -key sitenode $path/* $node_id] ns_log notice "--- precache <$cmd> -> <$node_id>" {*}$cmd } } # Local variables: # mode: tcl # tcl-indent-level: 4 # indent-tabs-mode: nil # End: