gustafn
committed
on 14 May 18
site-nodes cache reform: use ns_urlsspace instead of brute-force caching.

For OpenACS site with recent versions of NaviServer and XOTcl2,
c… Show more
site-nodes cache reform: use ns_urlsspace instead of brute-force caching.

For OpenACS site with recent versions of NaviServer and XOTcl2,

cache sitenode information much more efficiently by the built-in

URL trie, which supports tree match operations, for

tree information. This means that for example for .vuh

handlers it is not necessary to cache the full url for

obtaining the site-node, like it was until now:

   3839 id-/storage/view/installers/windows-installer/installer.htm

   3839 id-/storage/view/aolserver/install.tgz

   3839 id-/storage/view/tutorial/OpenACS_Tutorial.htm

   3839 id-/storage/view/openacs-dotlrn-conference-2007-spring/Methodology_ALPE.pdf

   3839 id-/storage/view/xowiki-resources/Assessment.jpg

   3839 id-/storage/view/tutorial-page-map.png

   ...

Providing a single entry like

   ns_urlspace set -key sitenode /storage/* 3839

is sufficient.

Why is this needed: current cache sizes of larger sites show 330K

(site A) and 390K (site B) cache entries. Matchbase flushes have to

gor thhrough all these entries, causing long lock times.  Running

thhis code at OpenACS.org shows an improvement by a factor of more

than 200x.

Show less